Emitting in this case can cause a crash.
This commit is contained in:
parent
78735cd31a
commit
7c4ac6bfcf
|
@ -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(scene, &VMainGraphicsScene::SelectedObject, m_dialogTool.data(), &DialogTool::SelectedObject);
|
||||||
connect(m_dialogTool.data(), &DialogTool::DialogClosed, this, closeDialogSlot);
|
connect(m_dialogTool.data(), &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||||
connect(m_dialogTool.data(), &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
connect(m_dialogTool.data(), &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||||
|
connect(m_dialogTool.data(), &DialogTool::destroyed, this, [this] { ShowToolTip(QString()); });
|
||||||
emit ui->view->itemClicked(nullptr);
|
emit ui->view->itemClicked(nullptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -108,8 +108,6 @@ DialogTool::DialogTool(const VContainer *data, VAbstractPattern *doc, quint32 to
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogTool::~DialogTool()
|
DialogTool::~DialogTool()
|
||||||
{
|
{
|
||||||
emit ToolTip(QString());
|
|
||||||
|
|
||||||
if (not vis.isNull())
|
if (not vis.isNull())
|
||||||
{
|
{
|
||||||
delete vis;
|
delete vis;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user