From 112fbb52df193206912daa179b172963ad3a7ab9 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Thu, 25 Jun 2015 14:27:13 +0200 Subject: [PATCH] Sketch: Bug Fix: Maintain the Elements and Constraint Widget synchronized ========================================================================= What? Sometimes this widgets where out of sync Why? Under the update only when it is redrawn policy, sometimes only one of them, i.e. the one associated with the property triggering the updateData was updated. Solution: Both are updated after every redraw. It also complements the previous bug fix related to crash on deleting, by updating the widgets to account for the deleted geometry. --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index fc4fe91bc0..987177dd60 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -4095,14 +4095,8 @@ void ViewProviderSketch::updateData(const App::Property *prop) UpdateSolverInformation(); // just update the solver window with the last SketchObject solving information draw(false); - if (edit && &(getSketchObject()->Constraints)) { - // send the signal for the TaskDlg. - signalConstraintsChanged(); - } - if (edit && &(getSketchObject()->Geometry)) { - // send the signal for the TaskDlg. - signalElementsChanged(); - } + signalConstraintsChanged(); + signalElementsChanged(); } } @@ -4792,10 +4786,13 @@ bool ViewProviderSketch::onDelete(const std::vector &subList) // onChanged did not update it. UpdateSolverInformation(); draw(); + + signalConstraintsChanged(); + signalElementsChanged(); } - this->drawConstraintIcons(); - this->updateColor(); + /*this->drawConstraintIcons(); + this->updateColor();*/ // if in edit not delete the object return false;