Skip to content

Commit

Permalink
Merge pull request #921 from ghutchis/fix-menu-priorities
Browse files Browse the repository at this point in the history
Fix selection menu priorities
  • Loading branch information
ghutchis authored Jun 2, 2022
2 parents 3a8b698 + de8f7af commit 14b6a52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions avogadro/qtplugins/select/select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,48 @@ Select::Select(QObject* parent_)
{
QAction* action = new QAction(tr("Select All"), this);
action->setShortcut(QKeySequence("Ctrl+A"));
action->setProperty("menu priority", 990);
connect(action, SIGNAL(triggered()), SLOT(selectAll()));
m_actions.append(action);

action = new QAction(tr("Select None"), this);
action->setShortcut(QKeySequence("Ctrl+Shift+A"));
action->setProperty("menu priority", 980);
connect(action, SIGNAL(triggered()), SLOT(selectNone()));
m_actions.append(action);

action = new QAction(this);
action->setSeparator(true);
action->setProperty("menu priority", 970);
m_actions.append(action);

action = new QAction(tr("Invert Selection"), this);
action->setProperty("menu priority", 890);
connect(action, SIGNAL(triggered()), SLOT(invertSelection()));
m_actions.append(action);

action = new QAction(tr("Select by Element…"), this);
action->setProperty("menu priority", 880);
connect(action, SIGNAL(triggered()), SLOT(selectElement()));
m_actions.append(action);

action = new QAction(tr("Select by Atom Index…"), this);
action->setProperty("menu priority", 870);
connect(action, SIGNAL(triggered()), SLOT(selectAtomIndex()));
m_actions.append(action);

action = new QAction(tr("Select by Residue…"), this);
action->setProperty("menu priority", 860);
connect(action, SIGNAL(triggered()), SLOT(selectResidue()));
m_actions.append(action);

action = new QAction(this);
action->setProperty("menu priority", 850);
action->setSeparator(true);
m_actions.append(action);

action = new QAction(tr("Create New Layer from Selection"), this);
action->setProperty("menu priority", 300);
connect(action, SIGNAL(triggered()), SLOT(createLayerFromSelection()));
m_actions.append(action);
}
Expand Down

0 comments on commit 14b6a52

Please sign in to comment.