Updating ellipse and rectangle colors updates cache as well
This commit is contained in:
parent
75a614946c
commit
069fc66565
4 changed files with 10 additions and 4 deletions
|
|
@ -26,7 +26,6 @@ void RectDrawTool::gui_toolbox() {
|
|||
}
|
||||
|
||||
bool RectDrawTool::edit_gui(const std::shared_ptr<DrawRectangle>& a) {
|
||||
DrawRectangle::Data oldData = a->d;
|
||||
Toolbar& t = drawP.world.main.toolbar;
|
||||
t.gui.push_id("edit tool rectangle");
|
||||
t.gui.text_label_centered("Edit Rectangle");
|
||||
|
|
@ -54,7 +53,10 @@ bool RectDrawTool::edit_gui(const std::shared_ptr<DrawRectangle>& a) {
|
|||
});
|
||||
}
|
||||
t.gui.pop_id();
|
||||
return a->d != oldData;
|
||||
|
||||
bool editHappened = a->d != controls.oldData;
|
||||
controls.oldData = a->d;
|
||||
return editHappened;
|
||||
}
|
||||
|
||||
void RectDrawTool::reset_tool() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue