From 1b08dbddf0a81e1acd19babc65675a983316c61e Mon Sep 17 00:00:00 2001 From: Abdelhadi-Wael Date: Sun, 9 Mar 2025 06:24:46 +0200 Subject: [PATCH] fixed warning --- src/Gui/CommandStructure.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Gui/CommandStructure.cpp b/src/Gui/CommandStructure.cpp index 382cfa53cd..c49769ba61 100644 --- a/src/Gui/CommandStructure.cpp +++ b/src/Gui/CommandStructure.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ #include @@ -71,14 +70,14 @@ void StdCmdPart::activated(int iMsg) // TODO We really must set label ourselves? (2015-08-17, Fat-Zer) doCommand(Doc,"App.activeDocument().%s.Label = '%s'", PartName.c_str(), QObject::tr(PartName.c_str()).toUtf8().data()); - - doCommand(Doc, + + doCommand(Doc, "selected_objects = Gui.Selection.getSelection()\n" "if len(selected_objects) > 1:\n" " for obj in selected_objects:\n" - " App.activeDocument().%s.addObject(obj)", + " App.activeDocument().%s.addObject(obj)", PartName.c_str()); - + doCommand(Gui::Command::Gui, "Gui.activateView('Gui::View3DInventor', True)\n" "Gui.activeView().setActiveObject('%s', App.activeDocument().%s)", PARTKEY, PartName.c_str());