Fix crash when adding datum and there's no active body
Plus fix double messageboxes about the lack of the body,
This commit is contained in:
@@ -56,7 +56,7 @@ void CmdPrimtiveCompAdditive::activated(int iMsg)
|
||||
{
|
||||
Base::Console().Message("activated msg %i\n", iMsg);
|
||||
|
||||
PartDesign::Body *pcActiveBody = PartDesignGui::getBody();
|
||||
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
|
||||
if (!pcActiveBody) return;
|
||||
|
||||
if(iMsg == 0) {
|
||||
@@ -206,4 +206,4 @@ void CreatePartDesignPrimitiveCommands(void)
|
||||
|
||||
rcCmdMgr.addCommand(new CmdPrimtiveCompAdditive);
|
||||
rcCmdMgr.addCommand(new CmdPrimtiveCompSubtractive);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user