PD: Disable PartDesign_CompDatums & PartDesign_CompSketches if dialog is open
A group command is not disabled if its default command is disabled. This allows it to invoke the command when it should be impossible. To fix the problem override the isActive() method in the sub-classes CmdPartDesignCompDatums & CmdPartDesignCompSketches This fixes #16294
This commit is contained in:
@@ -2460,7 +2460,7 @@ public:
|
||||
|
||||
bool isActive() override
|
||||
{
|
||||
return hasActiveDocument();
|
||||
return (hasActiveDocument() && !Gui::Control().activeDialog());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2495,7 +2495,7 @@ public:
|
||||
|
||||
bool isActive() override
|
||||
{
|
||||
return hasActiveDocument();
|
||||
return (hasActiveDocument() && !Gui::Control().activeDialog());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user