diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 2964eb56e..a1d90d3f4 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1913,6 +1913,7 @@ void MainWindow::CancelTool() currentScene->setFocus(Qt::OtherFocusReason); currentScene->clearSelection(); + ui->view->itemClicked(nullptr); // Hide visualization to avoid a crash switch ( currentTool ) { diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index 6d3c74ba0..24d985d45 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -187,7 +187,7 @@ inline void VAbstractTool::AddVisualization() connect(scene, &VMainGraphicsScene::NewFactor, visual, &Visualization::SetFactor); scene->addItem(visual); - connect(visual, &Visualization::ToolTip, RECEIVER(this)[this] (const QString &toolTip) {emit ToolTip(toolTip);}); + connect(visual, &Visualization::ToolTip, this, &VAbstractTool::ToolTip); vis = visual; }