From 9d19ac14c502e4effb9e76aa72f5ff99bd0930b4 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Sat, 2 Jul 2016 08:10:09 +0300 Subject: [PATCH] Resoved issue #522. Error: Crash in new file after clicking 'OK' in Point From Distance And Angle tool. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 03b76c2a2..3de1c204c 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -143,7 +143,10 @@ MainWindow::MainWindow(QWidget *parent) connect(doc, &VPattern::CheckLayout, [this](){ if (pattern->DataDetails()->count() == 0) { - ActionDraw(true); + if(not ui->actionDraw->isChecked()) + { + ActionDraw(true); + } } }); connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP); @@ -688,6 +691,7 @@ void MainWindow::ClosedDialogWithApply(int result) vtool->FullUpdateFromGuiApply(); } } + SCASSERT(dialogTool != nullptr); QGraphicsItem *tool = dynamic_cast(dialogTool->GetAssociatedTool()); ui->view->itemClicked(tool); if (dialogTool->GetAssociatedTool() != nullptr)