Skip to content

Commit

Permalink
+ fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jun 24, 2015
1 parent c3c2781 commit 165261e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp
Expand Up @@ -64,13 +64,13 @@ TaskDlgEditSketch::TaskDlgEditSketch(ViewProviderSketch *sketchView)
if (!hGrp->GetBool("ExpandedMessagesWidget",true))
Messages->hideGroupBox();
if (!hGrp->GetBool("ExpandedSolverAdvancedWidget",false))
SolverAdvanced->hideGroupBox();
SolverAdvanced->hideGroupBox();
if (!hGrp->GetBool("ExpandedEditControlWidget",false))
General->hideGroupBox();
if (!hGrp->GetBool("ExpandedConstraintsWidget",true))
Constraints->hideGroupBox();
Constraints->hideGroupBox();
if (!hGrp->GetBool("ExpandedElementsWidget",true))
Elements->hideGroupBox();
Elements->hideGroupBox();

App::Document* document = sketchView->getObject()->getDocument();
connectUndoDocument =
Expand All @@ -83,6 +83,12 @@ TaskDlgEditSketch::~TaskDlgEditSketch()
{
connectUndoDocument.disconnect();
connectRedoDocument.disconnect();

// to make sure to delete the advanced solver panel
// it must be part to the 'Content' array
std::vector<QWidget*>::iterator it = std::find(Content.begin(), Content.end(), SolverAdvanced);
if (it == Content.end())
Content.push_back(SolverAdvanced);
}

void TaskDlgEditSketch::slotUndoDocument(const App::Document& doc)
Expand Down

0 comments on commit 165261e

Please sign in to comment.