0000451: boolean operation display mode

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5251 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer
2011-12-10 14:17:22 +00:00
parent 1884ee3881
commit 6e138c79d7
2 changed files with 8 additions and 6 deletions

View File

@@ -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<std::string>::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<std::string>::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();
}

View File

@@ -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();
}