From e0ca7e5d80f8f2d53c35c9b53f8ff32c933cc656 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 26 Mar 2020 11:57:02 +0200 Subject: [PATCH] Valentina crashes when remove a group operation. --- src/app/valentina/dialogs/vwidgetgroups.cpp | 1 - src/libs/vtools/undocommands/undogroup.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index 17d09e1a9..dfb5737cc 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -311,7 +311,6 @@ void VWidgetGroups::UpdateGroups() //--------------------------------------------------------------------------------------------------------------------- void VWidgetGroups::FillTable(QMap groups) { - emit doc->UpdateToolTip(); ui->lineEditTags->SetCompletion(doc->GetGroupCategories()); groups = FilterGroups(groups); diff --git a/src/libs/vtools/undocommands/undogroup.cpp b/src/libs/vtools/undocommands/undogroup.cpp index 8b9def919..b4d21bcbf 100644 --- a/src/libs/vtools/undocommands/undogroup.cpp +++ b/src/libs/vtools/undocommands/undogroup.cpp @@ -92,6 +92,8 @@ void AddGroup::undo() { emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo } + + emit doc->UpdateToolTip(); } //--------------------------------------------------------------------------------------------------------------------- @@ -114,6 +116,8 @@ void AddGroup::redo() return; } + emit doc->UpdateToolTip(); + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); } @@ -134,6 +138,7 @@ void RenameGroup::undo() qCDebug(vUndo, "Undo."); doc->SetGroupName(nodeId, oldName); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //--------------------------------------------------------------------------------------------------------------------- @@ -143,6 +148,7 @@ void RenameGroup::redo() doc->SetGroupName(nodeId, newName); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //ChangeGroupOptions @@ -166,6 +172,7 @@ void ChangeGroupOptions::undo() doc->SetGroupName(nodeId, oldName); doc->SetGroupTags(nodeId, oldTags); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //--------------------------------------------------------------------------------------------------------------------- @@ -175,6 +182,7 @@ void ChangeGroupOptions::redo() doc->SetGroupName(nodeId, newName); doc->SetGroupTags(nodeId, newTags); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //AddItemToGroup