Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gui: Group View Commands in View toolbar #4999

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/Gui/CommandView.cpp
Expand Up @@ -1476,6 +1476,40 @@ void StdCmdViewRotateRight::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateRight()");
}

//======================================================================
// Std_ViewActions
//===========================================================================
//
class StdCmdViewActions : public GroupCommand
{
public:
StdCmdViewActions()
:GroupCommand("Std_ViewActions")
{
sGroup = QT_TR_NOOP("View");
sMenuText = QT_TR_NOOP("View actions");
sToolTipText = QT_TR_NOOP("Standard view actions");
sWhatsThis = "Std_ViewActions";
sStatusTip = QT_TR_NOOP("Standard view actions");
eType = 0;
bCanLog = false;

addCommand(new StdCmdViewIsometric());

addCommand();

addCommand(new StdCmdViewFront(), cmds.size());
addCommand(new StdCmdViewTop(), cmds.size());
addCommand(new StdCmdViewRight(), cmds.size());

addCommand();

addCommand(new StdCmdViewRear(), cmds.size());
addCommand(new StdCmdViewBottom(), cmds.size());
addCommand(new StdCmdViewLeft(), cmds.size());
};
virtual const char* className() const { return "StdCmdViewActions"; }
};

//===========================================================================
// Std_ViewFitAll
Expand Down Expand Up @@ -3794,6 +3828,7 @@ void CreateViewStdCommands(void)
rcCmdMgr.addCommand(new StdCmdViewFitSelection());
rcCmdMgr.addCommand(new StdCmdViewRotateLeft());
rcCmdMgr.addCommand(new StdCmdViewRotateRight());
rcCmdMgr.addCommand(new StdCmdViewActions());

rcCmdMgr.addCommand(new StdCmdViewExample1());
rcCmdMgr.addCommand(new StdCmdViewExample2());
Expand Down
5 changes: 2 additions & 3 deletions src/Gui/Workbench.cpp
Expand Up @@ -732,9 +732,8 @@ ToolBarItem* StdWorkbench::setupToolBars() const
view->setCommand("View");
*view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_DrawStyle" << "Std_SelBoundingBox"
<< "Separator" << "Std_SelBack" << "Std_SelForward" << "Std_LinkSelectActions"
<< "Separator" << "Std_TreeViewActions" << "Std_ViewIsometric" << "Separator" << "Std_ViewFront"
<< "Std_ViewTop" << "Std_ViewRight" << "Separator" << "Std_ViewRear" << "Std_ViewBottom"
<< "Std_ViewLeft" << "Separator" << "Std_MeasureDistance" ;
<< "Separator" << "Std_TreeViewActions" << "Separator" << "Std_ViewActions"
<< "Separator" << "Std_MeasureDistance" ;

// Structure
ToolBarItem* structure = new ToolBarItem( root );
Expand Down