Emitting in this case can cause a crash.

This commit is contained in:
Roman Telezhynskyi 2024-04-29 16:59:30 +03:00
parent 78735cd31a
commit 7c4ac6bfcf
2 changed files with 1 additions and 2 deletions

View File

@ -896,6 +896,7 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
connect(scene, &VMainGraphicsScene::SelectedObject, m_dialogTool.data(), &DialogTool::SelectedObject);
connect(m_dialogTool.data(), &DialogTool::DialogClosed, this, closeDialogSlot);
connect(m_dialogTool.data(), &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
connect(m_dialogTool.data(), &DialogTool::destroyed, this, [this] { ShowToolTip(QString()); });
emit ui->view->itemClicked(nullptr);
}
else

View File

@ -108,8 +108,6 @@ DialogTool::DialogTool(const VContainer *data, VAbstractPattern *doc, quint32 to
//---------------------------------------------------------------------------------------------------------------------
DialogTool::~DialogTool()
{
emit ToolTip(QString());
if (not vis.isNull())
{
delete vis;