From 841044a00a36a67a614b2919fc1d5182a6f667ae Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 8 Oct 2022 18:57:59 +0200 Subject: [PATCH] Gui: [skip ci] do not change link property when canceling dialog --- src/Gui/propertyeditor/PropertyItem.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 4626fd7961..b78ec0cf82 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -4360,12 +4360,15 @@ void LinkLabel::onLinkActivated (const QString& s) void LinkLabel::onEditClicked () { - if(!dlg) { + if (!dlg) { dlg = new DlgPropertyLink(this); dlg->init(objProp,true); - connect(dlg, SIGNAL(finished(int)), this, SLOT(onLinkChanged())); - } else + connect(dlg, &DlgPropertyLink::accepted, this, &LinkLabel::onLinkChanged); + } + else { dlg->init(objProp,false); + } + dlg->show(); }