From 83a6d679aa4edfcfee8610fe327b388cc1d0b4a0 Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Mon, 17 Nov 2025 17:54:55 +0100 Subject: [PATCH] Sketcher: Remove transaction from TaskSketcherConstraints::doSetVisible (#25255) * Sketcher: Remove transaction from TaskSketcherConstraints::doSetVisible * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp index bcc79d8664..060cbbf7d0 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp @@ -1554,26 +1554,13 @@ bool TaskSketcherConstraints::doSetVisible(const std::vector& constrIds, bo std::string constrIdList = stream.str(); - // Do not create a command if there is already a command (ea Dimension tool) running - bool createCommand = !Gui::Command::hasPendingCommand(); - if (createCommand) { - Gui::Command::openCommand( - QT_TRANSLATE_NOOP("Command", "Update constraint's visibility")); - } try { Gui::cmdAppObjectArgs(sketch, "setVisibility(%s, %s)", constrIdList, isVisible ? "True" : "False"); - if (createCommand) { - Gui::Command::commitCommand(); - } } catch (const Base::Exception& e) { - if (createCommand) { - Gui::Command::abortCommand(); - } - Gui::TranslatedUserError( sketch, tr("Error"), tr("Impossible to update visibility:") + QLatin1String(" ") + QLatin1String(e.what())); return false;