Add command to toggle selection to context-menu
This commit is contained in:
parent
f250478c7e
commit
e861274c2f
|
@ -403,15 +403,16 @@ void StdWorkbench::setupContextMenu(const char* recipient, MenuItem* item) const
|
|||
<< "Separator" << "Std_ViewDockUndockFullscreen";
|
||||
|
||||
if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 )
|
||||
*item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_TreeSelection"
|
||||
*item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility"
|
||||
<< "Std_ToggleSelectability" << "Std_TreeSelection"
|
||||
<< "Std_RandomColor" << "Separator" << "Std_Delete";
|
||||
}
|
||||
else if (strcmp(recipient,"Tree") == 0)
|
||||
{
|
||||
if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 )
|
||||
*item << "Std_ToggleVisibility" << "Std_ShowSelection" << "Std_HideSelection"
|
||||
<< "Separator" << "Std_SetAppearance" << "Std_RandomColor"
|
||||
<< "Separator" << "Std_Delete";
|
||||
<< "Std_ToggleSelectability" << "Separator" << "Std_SetAppearance"
|
||||
<< "Std_RandomColor" << "Separator" << "Std_Delete";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,25 +89,25 @@ void Workbench::setupContextMenu(const char* recipient,Gui::MenuItem* item) cons
|
|||
|
||||
*DraftContext << "Draft_ApplyStyle" << "Draft_ToggleDisplayMode"
|
||||
<< "Draft_AddToGroup";
|
||||
*item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_TreeSelection"
|
||||
*item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility"
|
||||
<< "Std_ToggleSelectability" << "Std_TreeSelection"
|
||||
<< "Std_RandomColor" << "Separator" << "Std_Delete" << DraftContext;
|
||||
}
|
||||
}
|
||||
else if (strcmp(recipient,"Tree") == 0)
|
||||
{
|
||||
if ( Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 )
|
||||
{
|
||||
if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 ) {
|
||||
Gui::MenuItem* DraftContext = new Gui::MenuItem();
|
||||
DraftContext->setCommand("Display options");
|
||||
|
||||
*DraftContext << "Draft_ApplyStyle" << "Draft_ToggleDisplayMode"
|
||||
<< "Draft_AddToGroup";
|
||||
|
||||
*item << "Std_SetAppearance" << "Std_ToggleVisibility"
|
||||
<< "Std_RandomColor" << "Separator" << "Std_Delete"
|
||||
*item << "Std_ToggleVisibility" << "Std_ShowSelection" << "Std_HideSelection"
|
||||
<< "Std_ToggleSelectability" << "Separator" << "Std_SetAppearance"
|
||||
<< "Std_ToggleVisibility" << "Std_RandomColor" << "Separator" << "Std_Delete"
|
||||
<< DraftContext;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user