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:
wmayer
2024-10-13 19:58:27 +02:00
committed by Yorik van Havre
parent cd55faf04e
commit 7e473beed0

View File

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