From 6e138c79d7cf3116df2c7ae86b81121c73580243 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 10 Dec 2011 14:17:22 +0000 Subject: [PATCH] 0000451: boolean operation display mode git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5251 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Mod/Part/Gui/Command.cpp | 9 ++++++--- src/Mod/Part/Gui/DlgBooleanOperation.cpp | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index 4d61b79c49..e5ccaaac5f 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -258,7 +258,8 @@ void CmdPartCut::activated(int iMsg) doCommand(Doc,"App.activeDocument().%s.Tool = App.activeDocument().%s",FeatName.c_str(),ToolName.c_str()); doCommand(Gui,"Gui.activeDocument().hide('%s')",BaseName.c_str()); doCommand(Gui,"Gui.activeDocument().hide('%s')",ToolName.c_str()); - doCommand(Gui,"Gui.activeDocument().%s.ShapeColor = Gui.activeDocument().%s.ShapeColor", FeatName.c_str(),BaseName.c_str()); + copyVisual(FeatName.c_str(), "ShapeColor", BaseName.c_str()); + copyVisual(FeatName.c_str(), "DisplayMode", BaseName.c_str()); updateActive(); commitCommand(); } @@ -310,7 +311,8 @@ void CmdPartCommon::activated(int iMsg) doCommand(Doc,"App.activeDocument().%s.Shapes = [%s]",FeatName.c_str(),ObjectBuf.c_str()); for (std::vector::iterator it = tempSelNames.begin(); it != tempSelNames.end(); ++it) doCommand(Gui,"Gui.activeDocument().%s.Visibility=False",it->c_str()); - doCommand(Gui,"Gui.activeDocument().%s.ShapeColor = Gui.activeDocument().%s.ShapeColor", FeatName.c_str(),tempSelNames.front().c_str()); + copyVisual(FeatName.c_str(), "ShapeColor", tempSelNames.front().c_str()); + copyVisual(FeatName.c_str(), "DisplayMode", tempSelNames.front().c_str()); updateActive(); commitCommand(); } @@ -362,7 +364,8 @@ void CmdPartFuse::activated(int iMsg) doCommand(Doc,"App.activeDocument().%s.Shapes = [%s]",FeatName.c_str(),ObjectBuf.c_str()); for (std::vector::iterator it = tempSelNames.begin(); it != tempSelNames.end(); ++it) doCommand(Gui,"Gui.activeDocument().%s.Visibility=False",it->c_str()); - doCommand(Gui,"Gui.activeDocument().%s.ShapeColor = Gui.activeDocument().%s.ShapeColor", FeatName.c_str(),tempSelNames.front().c_str()); + copyVisual(FeatName.c_str(), "ShapeColor", tempSelNames.front().c_str()); + copyVisual(FeatName.c_str(), "DisplayMode", tempSelNames.front().c_str()); updateActive(); commitCommand(); } diff --git a/src/Mod/Part/Gui/DlgBooleanOperation.cpp b/src/Mod/Part/Gui/DlgBooleanOperation.cpp index 96956d46d7..87d766e855 100644 --- a/src/Mod/Part/Gui/DlgBooleanOperation.cpp +++ b/src/Mod/Part/Gui/DlgBooleanOperation.cpp @@ -386,9 +386,8 @@ void DlgBooleanOperation::accept() "Gui.activeDocument().hide(\"%s\")",shapeOne.c_str()); Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().hide(\"%s\")",shapeTwo.c_str()); - Gui::Command::doCommand(Gui::Command::Gui, - "Gui.activeDocument().%s.ShapeColor = Gui.activeDocument().%s.ShapeColor", - objName.c_str(),shapeOne.c_str()); + Gui::Command::copyVisual(objName.c_str(), "ShapeColor", shapeOne.c_str()); + Gui::Command::copyVisual(objName.c_str(), "DisplayMode", shapeOne.c_str()); activeDoc->commitTransaction(); activeDoc->recompute(); }