Fix accessibility of some group commands
Several group commands are active but require an active document to work. This PR overrides the method isActive() to disable the commands if no active document exists. The affected commands are: * Std_ViewGroup * Std_LinkActions * PartDesign_CompDatums * PartDesign_CompSketches
This commit is contained in:
@@ -892,7 +892,15 @@ public:
|
||||
addCommand(new StdCmdLinkImportAll());
|
||||
}
|
||||
|
||||
const char* className() const override {return "StdCmdLinkActions";}
|
||||
const char* className() const override
|
||||
{
|
||||
return "StdCmdLinkActions";
|
||||
}
|
||||
|
||||
bool isActive() override
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
|
||||
@@ -1648,6 +1648,11 @@ public:
|
||||
{
|
||||
return "StdCmdViewGroup";
|
||||
}
|
||||
|
||||
bool isActive() override
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
|
||||
@@ -2422,6 +2422,11 @@ public:
|
||||
{
|
||||
return "CmdPartDesignCompDatums";
|
||||
}
|
||||
|
||||
bool isActive() override
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
};
|
||||
|
||||
// Command group for datums =============================================
|
||||
@@ -2452,6 +2457,11 @@ public:
|
||||
{
|
||||
return "CmdPartDesignCompSketches";
|
||||
}
|
||||
|
||||
bool isActive() override
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user