PartDesign: Use AllowCompound user parameter along the workbench - fixes #23596
This commit is contained in:
committed by
Chris Hennes
parent
68b754effd
commit
406c3ba42c
@@ -471,8 +471,15 @@ void CmdPartDesignMigrate::activated(int iMsg)
|
||||
std::string bodyName = getUniqueObjectName (
|
||||
std::string ( chainIt->back()->getNameInDocument() ).append ( "Body" ).c_str () ) ;
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp/Preferences/Mod/PartDesign");
|
||||
|
||||
bool allowCompound = hGrp->GetBool("AllowCompoundDefault", true);
|
||||
|
||||
// Create a body for the chain
|
||||
doCommand ( Doc,"App.activeDocument().addObject('PartDesign::Body','%s')", bodyName.c_str () );
|
||||
doCommand ( Doc,"App.ActiveDocument.getObject('%s').AllowCompound = %s", bodyName.c_str(), allowCompound ? "True" : "False");
|
||||
doCommand ( Doc,"App.activeDocument().%s.addObject(App.ActiveDocument.%s)",
|
||||
actPart->getNameInDocument (), bodyName.c_str () );
|
||||
if (base) {
|
||||
|
||||
Reference in New Issue
Block a user