From 947a030e37edb44c281caf5a5cda780d9b9e411b Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 9 Mar 2014 11:02:33 +0100 Subject: [PATCH] + fixes #0001112: Changing sketch size that contains arcs after padding will create an artifact on bottom side --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 4fa70da55..a655c2706 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -167,6 +167,7 @@ struct EditData { int PreselectConstraint; bool blockedPreselection; bool FullyConstrained; + bool visibleBeforeEdit; // instance of the solver Sketcher::Sketch ActSketch; @@ -2940,6 +2941,7 @@ bool ViewProviderSketch::setEdit(int ModNum) edit = new EditData(); createEditInventorNodes(); + edit->visibleBeforeEdit = this->isVisible(); this->hide(); // avoid that the wires interfere with the edit lines ShowGrid.setValue(true); @@ -3245,11 +3247,14 @@ void ViewProviderSketch::unsetEdit(int ModNum) if (edit->sketchHandler) deactivateHandler(); + if (edit->visibleBeforeEdit) + this->show(); + else + this->hide(); + delete edit; edit = 0; - this->show(); - try { // and update the sketch getSketchObject()->getDocument()->recompute();