Resoved issue #522. Error: Crash in new file after clicking 'OK' in Point From

Distance And Angle tool.

--HG--
branch : develop
This commit is contained in:
Valentina Zhuravska 2016-07-02 08:10:09 +03:00
parent 49258cac8c
commit 9d19ac14c5

View File

@ -142,9 +142,12 @@ MainWindow::MainWindow(QWidget *parent)
connect(doc, &VPattern::SetEnabledGUI, this, &MainWindow::SetEnabledGUI);
connect(doc, &VPattern::CheckLayout, [this](){
if (pattern->DataDetails()->count() == 0)
{
if(not ui->actionDraw->isChecked())
{
ActionDraw(true);
}
}
});
connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP);
qApp->setCurrentDocument(doc);
@ -688,6 +691,7 @@ void MainWindow::ClosedDialogWithApply(int result)
vtool->FullUpdateFromGuiApply();
}
}
SCASSERT(dialogTool != nullptr);
QGraphicsItem *tool = dynamic_cast<QGraphicsItem *>(dialogTool->GetAssociatedTool());
ui->view->itemClicked(tool);
if (dialogTool->GetAssociatedTool() != nullptr)