mirror of
https://github.com/leozide/leocad
synced 2024-11-16 07:47:27 +01:00
Moved Duplicate to the Piece Menu.
This commit is contained in:
parent
cf65201095
commit
8125ee8f74
4 changed files with 15 additions and 15 deletions
|
@ -179,13 +179,6 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
QT_TRANSLATE_NOOP("Status", "Insert Clipboard contents"),
|
||||
QT_TRANSLATE_NOOP("Shortcut", "Ctrl+V")
|
||||
},
|
||||
// LC_EDIT_DUPLICATE
|
||||
{
|
||||
QT_TRANSLATE_NOOP("Action", "Edit.Duplicate"),
|
||||
QT_TRANSLATE_NOOP("Menu", "&Duplicate"),
|
||||
QT_TRANSLATE_NOOP("Status", "Create a copy of the selected pieces"),
|
||||
QT_TRANSLATE_NOOP("Shortcut", "Ctrl+D")
|
||||
},
|
||||
// LC_EDIT_FIND
|
||||
{
|
||||
QT_TRANSLATE_NOOP("Action", "Edit.Find"),
|
||||
|
@ -963,6 +956,13 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
QT_TRANSLATE_NOOP("Status", "Delete selected objects"),
|
||||
QT_TRANSLATE_NOOP("Shortcut", "Delete")
|
||||
},
|
||||
// LC_PIECE_DUPLICATE
|
||||
{
|
||||
QT_TRANSLATE_NOOP("Action", "Edit.Duplicate"),
|
||||
QT_TRANSLATE_NOOP("Menu", "&Duplicate"),
|
||||
QT_TRANSLATE_NOOP("Status", "Create a copy of the selected pieces"),
|
||||
QT_TRANSLATE_NOOP("Shortcut", "Ctrl+D")
|
||||
},
|
||||
// LC_PIECE_RESET_PIVOT_POINT
|
||||
{
|
||||
QT_TRANSLATE_NOOP("Action", "Piece.ResetPivotPoint"),
|
||||
|
|
|
@ -30,7 +30,6 @@ enum lcCommandId
|
|||
LC_EDIT_CUT,
|
||||
LC_EDIT_COPY,
|
||||
LC_EDIT_PASTE,
|
||||
LC_EDIT_DUPLICATE,
|
||||
LC_EDIT_FIND,
|
||||
LC_EDIT_FIND_NEXT,
|
||||
LC_EDIT_FIND_PREVIOUS,
|
||||
|
@ -148,6 +147,7 @@ enum lcCommandId
|
|||
LC_VIEW_PROJECTION_LAST = LC_VIEW_PROJECTION_ORTHO,
|
||||
LC_PIECE_INSERT,
|
||||
LC_PIECE_DELETE,
|
||||
LC_PIECE_DUPLICATE,
|
||||
LC_PIECE_RESET_PIVOT_POINT,
|
||||
LC_PIECE_CONTROL_POINT_INSERT,
|
||||
LC_PIECE_CONTROL_POINT_REMOVE,
|
||||
|
|
|
@ -366,7 +366,6 @@ void lcMainWindow::CreateMenus()
|
|||
EditMenu->addAction(mActions[LC_EDIT_CUT]);
|
||||
EditMenu->addAction(mActions[LC_EDIT_COPY]);
|
||||
EditMenu->addAction(mActions[LC_EDIT_PASTE]);
|
||||
EditMenu->addAction(mActions[LC_EDIT_DUPLICATE]);
|
||||
EditMenu->addSeparator();
|
||||
EditMenu->addAction(mActions[LC_EDIT_FIND]);
|
||||
|
||||
|
@ -418,6 +417,7 @@ void lcMainWindow::CreateMenus()
|
|||
QMenu* PieceMenu = menuBar()->addMenu(tr("&Piece"));
|
||||
PieceMenu->addAction(mActions[LC_PIECE_INSERT]);
|
||||
PieceMenu->addAction(mActions[LC_PIECE_DELETE]);
|
||||
PieceMenu->addAction(mActions[LC_PIECE_DUPLICATE]);
|
||||
PieceMenu->addAction(mActions[LC_PIECE_RESET_PIVOT_POINT]);
|
||||
PieceMenu->addAction(mActions[LC_PIECE_ARRAY]);
|
||||
PieceMenu->addAction(mActions[LC_PIECE_MINIFIG_WIZARD]);
|
||||
|
@ -1471,7 +1471,6 @@ void lcMainWindow::UpdateSelectedObjects(bool SelectionChanged)
|
|||
|
||||
mActions[LC_EDIT_CUT]->setEnabled(Flags & LC_SEL_SELECTED);
|
||||
mActions[LC_EDIT_COPY]->setEnabled(Flags & LC_SEL_SELECTED);
|
||||
mActions[LC_EDIT_DUPLICATE]->setEnabled(Flags & LC_SEL_SELECTED);
|
||||
mActions[LC_EDIT_FIND]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0);
|
||||
mActions[LC_EDIT_FIND_NEXT]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0);
|
||||
mActions[LC_EDIT_FIND_PREVIOUS]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0);
|
||||
|
@ -1482,6 +1481,7 @@ void lcMainWindow::UpdateSelectedObjects(bool SelectionChanged)
|
|||
mActions[LC_EDIT_SELECT_ALL]->setEnabled(Flags & LC_SEL_UNSELECTED);
|
||||
|
||||
mActions[LC_PIECE_DELETE]->setEnabled(Flags & LC_SEL_SELECTED);
|
||||
mActions[LC_PIECE_DUPLICATE]->setEnabled(Flags & LC_SEL_SELECTED);
|
||||
mActions[LC_PIECE_RESET_PIVOT_POINT]->setEnabled(Flags & LC_SEL_SELECTED);
|
||||
mActions[LC_PIECE_ARRAY]->setEnabled(Flags & LC_SEL_PIECE);
|
||||
mActions[LC_PIECE_CONTROL_POINT_INSERT]->setEnabled(Flags & LC_SEL_CAN_ADD_CONTROL_POINT);
|
||||
|
@ -2036,10 +2036,6 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId)
|
|||
lcGetActiveModel()->Paste();
|
||||
break;
|
||||
|
||||
case LC_EDIT_DUPLICATE:
|
||||
lcGetActiveModel()->DuplicateSelectedPieces();
|
||||
break;
|
||||
|
||||
case LC_EDIT_FIND:
|
||||
if (DoDialog(LC_DIALOG_FIND, &mSearchOptions))
|
||||
lcGetActiveModel()->FindPiece(true, true);
|
||||
|
@ -2111,6 +2107,10 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId)
|
|||
lcGetActiveModel()->DeleteSelectedObjects();
|
||||
break;
|
||||
|
||||
case LC_PIECE_DUPLICATE:
|
||||
lcGetActiveModel()->DuplicateSelectedPieces();
|
||||
break;
|
||||
|
||||
case LC_PIECE_RESET_PIVOT_POINT:
|
||||
lcGetActiveModel()->ResetSelectedPiecesPivotPoint();
|
||||
break;
|
||||
|
|
|
@ -341,7 +341,7 @@ void View::ShowContextMenu() const
|
|||
Popup->addAction(Actions[LC_EDIT_CUT]);
|
||||
Popup->addAction(Actions[LC_EDIT_COPY]);
|
||||
Popup->addAction(Actions[LC_EDIT_PASTE]);
|
||||
Popup->addAction(Actions[LC_EDIT_DUPLICATE]);
|
||||
Popup->addAction(Actions[LC_PIECE_DUPLICATE]);
|
||||
|
||||
Popup->addSeparator();
|
||||
|
||||
|
|
Loading…
Reference in a new issue