Navigation Menu

Skip to content

Commit

Permalink
Sketch: Bug Fix: Maintain the Elements and Constraint Widget synchron…
Browse files Browse the repository at this point in the history
…ized

=========================================================================

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.
  • Loading branch information
abdullahtahiriyo committed Jun 25, 2015
1 parent 2141696 commit cac47d2
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
Expand Up @@ -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();

}
}
Expand Down Expand Up @@ -4792,10 +4786,13 @@ bool ViewProviderSketch::onDelete(const std::vector<std::string> &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;
Expand Down

0 comments on commit cac47d2

Please sign in to comment.