mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Removed copy keys command.
This commit is contained in:
parent
88ac2de732
commit
44e85eb339
4 changed files with 39 additions and 71 deletions
|
@ -218,7 +218,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
{
|
||||
"Edit.SelectAll",
|
||||
"Select &All",
|
||||
"Select all parts in the project",
|
||||
"Select all pieces in the project",
|
||||
"Ctrl+A"
|
||||
},
|
||||
// LC_EDIT_SELECT_NONE
|
||||
|
@ -575,7 +575,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
{
|
||||
"Edit.Tool.Insert",
|
||||
"Insert",
|
||||
"Add new parts to the model",
|
||||
"Add new pieces to the model",
|
||||
""
|
||||
},
|
||||
// LC_EDIT_ACTION_LIGHT
|
||||
|
@ -617,7 +617,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
{
|
||||
"Edit.Tool.Rotate",
|
||||
"Rotate",
|
||||
"Rotate selected parts",
|
||||
"Rotate selected pieces",
|
||||
"Shift+R"
|
||||
},
|
||||
// LC_EDIT_ACTION_DELETE
|
||||
|
@ -631,7 +631,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
{
|
||||
"Edit.Tool.Paint",
|
||||
"Paint",
|
||||
"Change part color",
|
||||
"Change piece color",
|
||||
"Shift+N"
|
||||
},
|
||||
// LC_EDIT_ACTION_ZOOM
|
||||
|
@ -701,7 +701,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
{
|
||||
"View.ZoomExtents",
|
||||
"Zoom E&xtents",
|
||||
"Fit all parts in current the view (hold the CTRL key down to zoom all views)",
|
||||
"Fit all pieces in current the view (hold the CTRL key down to zoom all views)",
|
||||
""
|
||||
},
|
||||
// LC_VIEW_VIEWPOINT_FRONT
|
||||
|
@ -986,191 +986,184 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
|||
},
|
||||
// LC_PIECE_INSERT
|
||||
{
|
||||
"Part.Insert",
|
||||
"Piece.Insert",
|
||||
"&Insert",
|
||||
"Add a new part to the model",
|
||||
"Add a new piece to the model",
|
||||
"Insert"
|
||||
},
|
||||
// LC_PIECE_DELETE
|
||||
{
|
||||
"Part.Delete",
|
||||
"Piece.Delete",
|
||||
"&Delete",
|
||||
"Delete selected objects",
|
||||
"Delete"
|
||||
},
|
||||
// LC_PIECE_MOVE_PLUSX
|
||||
{
|
||||
"Part.Move.PlusX",
|
||||
"Piece.Move.PlusX",
|
||||
"Move +X",
|
||||
"Move selected objects along the X axis",
|
||||
"Down"
|
||||
},
|
||||
// LC_PIECE_MOVE_MINUSX
|
||||
{
|
||||
"Part.Move.MinusX",
|
||||
"Piece.Move.MinusX",
|
||||
"Move -X",
|
||||
"Move selected objects along the X axis",
|
||||
"Up"
|
||||
},
|
||||
// LC_PIECE_MOVE_PLUSY
|
||||
{
|
||||
"Part.Move.PlusY",
|
||||
"Piece.Move.PlusY",
|
||||
"Move +Y",
|
||||
"Move selected objects along the Y axis",
|
||||
"Right"
|
||||
},
|
||||
// LC_PIECE_MOVE_MINUSY
|
||||
{
|
||||
"Part.Move.MinusY",
|
||||
"Piece.Move.MinusY",
|
||||
"Move -Y",
|
||||
"Move selected objects along the Y axis",
|
||||
"Left"
|
||||
},
|
||||
// LC_PIECE_MOVE_PLUSZ
|
||||
{
|
||||
"Part.Move.PlusZ",
|
||||
"Piece.Move.PlusZ",
|
||||
"Move +Z",
|
||||
"Move selected objects along the Z axis",
|
||||
"PgUp"
|
||||
},
|
||||
// LC_PIECE_MOVE_MINUSZ
|
||||
{
|
||||
"Part.Move.MinusZ",
|
||||
"Piece.Move.MinusZ",
|
||||
"Move -Z",
|
||||
"Move selected objects along the Z axis",
|
||||
"PgDown"
|
||||
},
|
||||
// LC_PIECE_ROTATE_PLUSX
|
||||
{
|
||||
"Part.Rotate.PlusX",
|
||||
"Piece.Rotate.PlusX",
|
||||
"Rotate +X",
|
||||
"Rotate selected objects along the X axis",
|
||||
"Shift+Down"
|
||||
},
|
||||
// LC_PIECE_ROTATE_MINUSX
|
||||
{
|
||||
"Part.Rotate.MinusX",
|
||||
"Piece.Rotate.MinusX",
|
||||
"Rotate -X",
|
||||
"Rotate selected objects along the X axis",
|
||||
"Shift+Up"
|
||||
},
|
||||
// LC_PIECE_ROTATE_PLUSY
|
||||
{
|
||||
"Part.Rotate.PlusY",
|
||||
"Piece.Rotate.PlusY",
|
||||
"Rotate +Y",
|
||||
"Rotate selected objects along the Y axis",
|
||||
"Shift+Right"
|
||||
},
|
||||
// LC_PIECE_ROTATE_MINUSY
|
||||
{
|
||||
"Part.Rotate.MinusY",
|
||||
"Piece.Rotate.MinusY",
|
||||
"Rotate -Y",
|
||||
"Rotate selected objects along the Y axis",
|
||||
"Shift+Left"
|
||||
},
|
||||
// LC_PIECE_ROTATE_PLUSZ
|
||||
{
|
||||
"Part.Rotate.PlusZ",
|
||||
"Piece.Rotate.PlusZ",
|
||||
"Rotate +Z",
|
||||
"Rotate selected objects along the Z axis",
|
||||
"Shift+PgUp"
|
||||
},
|
||||
// LC_PIECE_ROTATE_MINUSZ
|
||||
{
|
||||
"Part.Rotate.MinusZ",
|
||||
"Piece.Rotate.MinusZ",
|
||||
"Rotate -Z",
|
||||
"Rotate selected objects along the Z axis",
|
||||
"Shift+PgDown"
|
||||
},
|
||||
// LC_PIECE_MINIFIG_WIZARD
|
||||
{
|
||||
"Part.MinifigWizard",
|
||||
"Piece.MinifigWizard",
|
||||
"Minifig &Wizard...",
|
||||
"Add a new minifig to the model",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_ARRAY
|
||||
{
|
||||
"Part.Array",
|
||||
"Piece.Array",
|
||||
"A&rray...",
|
||||
"Make copies of the selected parts",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_COPY_KEYS
|
||||
{
|
||||
"Part.CopyKeys",
|
||||
"Copy Keys",
|
||||
"Copy keys between animation and instruction modes",
|
||||
"Make copies of the selected pieces",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_GROUP
|
||||
{
|
||||
"Part.Group",
|
||||
"Piece.Group",
|
||||
"&Group...",
|
||||
"Group selected parts together",
|
||||
"Group selected pieces together",
|
||||
"Ctrl+G"
|
||||
},
|
||||
// LC_PIECE_UNGROUP
|
||||
{
|
||||
"Part.Ungroup",
|
||||
"Piece.Ungroup",
|
||||
"&Ungroup",
|
||||
"Ungroup selected group",
|
||||
"Ctrl+U"
|
||||
},
|
||||
// LC_PIECE_GROUP_ADD
|
||||
{
|
||||
"Part.GroupAdd",
|
||||
"Piece.GroupAdd",
|
||||
"&Add to Group",
|
||||
"Add focused part to selected group",
|
||||
"Add focused piece to selected group",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_GROUP_REMOVE
|
||||
{
|
||||
"Part.GroupRemove",
|
||||
"Piece.GroupRemove",
|
||||
"Re&move from Group",
|
||||
"Remove focused part from group",
|
||||
"Remove focused piece from group",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_GROUP_EDIT
|
||||
{
|
||||
"Part.GroupEdit",
|
||||
"Piece.GroupEdit",
|
||||
"&Edit Groups...",
|
||||
"Edit groups",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_HIDE_SELECTED
|
||||
{
|
||||
"Part.HideSelected",
|
||||
"Piece.HideSelected",
|
||||
"&Hide Selected",
|
||||
"Hide selected objects",
|
||||
"Ctrl+H"
|
||||
},
|
||||
// LC_PIECE_HIDE_UNSELECTED
|
||||
{
|
||||
"Part.HideUnselected",
|
||||
"Piece.HideUnselected",
|
||||
"Hide &Unselected",
|
||||
"Hide objects that are not selected",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_UNHIDE_ALL
|
||||
{
|
||||
"Part.UnhideAll",
|
||||
"Piece.UnhideAll",
|
||||
"U&nhide All",
|
||||
"Show all hidden objects",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_SHOW_EARLIER
|
||||
{
|
||||
"Part.ShowEarlier",
|
||||
"Piece.ShowEarlier",
|
||||
"Show Earlier",
|
||||
"Show selected parts one step earlier",
|
||||
"Show selected pieces one step earlier",
|
||||
""
|
||||
},
|
||||
// LC_PIECE_SHOW_LATER
|
||||
{
|
||||
"Part.ShowLater",
|
||||
"Piece.ShowLater",
|
||||
"Show Later",
|
||||
"Show selected parts one step later",
|
||||
"Show selected pieces one step later",
|
||||
""
|
||||
},
|
||||
// LC_HELP_HOMEPAGE
|
||||
|
|
|
@ -165,7 +165,6 @@ enum LC_COMMANDS
|
|||
LC_PIECE_ROTATE_MINUSZ,
|
||||
LC_PIECE_MINIFIG_WIZARD,
|
||||
LC_PIECE_ARRAY,
|
||||
LC_PIECE_COPY_KEYS,
|
||||
LC_PIECE_GROUP,
|
||||
LC_PIECE_UNGROUP,
|
||||
LC_PIECE_GROUP_ADD,
|
||||
|
|
|
@ -5895,26 +5895,6 @@ void Project::HandleCommand(LC_COMMANDS id)
|
|||
CheckPoint("Array");
|
||||
} break;
|
||||
|
||||
case LC_PIECE_COPY_KEYS:
|
||||
{
|
||||
float move[3], rot[4];
|
||||
Piece* pPiece;
|
||||
|
||||
for (pPiece = m_pPieces; pPiece; pPiece = pPiece->m_pNext)
|
||||
if (pPiece->IsSelected())
|
||||
{
|
||||
pPiece->CalculateSingleKey (m_bAnimation ? m_nCurStep : m_nCurFrame, !m_bAnimation, LC_PK_POSITION, move);
|
||||
pPiece->CalculateSingleKey (m_bAnimation ? m_nCurStep : m_nCurFrame, !m_bAnimation, LC_PK_ROTATION, rot);
|
||||
pPiece->ChangeKey(m_bAnimation ? m_nCurFrame : m_nCurStep, m_bAnimation, m_bAddKeys, move, LC_PK_POSITION);
|
||||
pPiece->ChangeKey(m_bAnimation ? m_nCurFrame : m_nCurStep, m_bAnimation, m_bAddKeys, rot, LC_PK_ROTATION);
|
||||
}
|
||||
|
||||
// TODO: cameras and lights
|
||||
|
||||
CalculateStep();
|
||||
UpdateAllViews();
|
||||
} break;
|
||||
|
||||
case LC_PIECE_GROUP:
|
||||
{
|
||||
Group* pGroup;
|
||||
|
|
|
@ -331,12 +331,11 @@ void lcQMainWindow::createMenus()
|
|||
menuToolBars->addAction(timeToolBar->toggleViewAction());
|
||||
menuView->addAction(actions[LC_VIEW_FULLSCREEN]);
|
||||
|
||||
menuPiece = menuBar()->addMenu(tr("&Part"));
|
||||
menuPiece = menuBar()->addMenu(tr("&Piece"));
|
||||
menuPiece->addAction(actions[LC_PIECE_INSERT]);
|
||||
menuPiece->addAction(actions[LC_PIECE_DELETE]);
|
||||
menuPiece->addAction(actions[LC_PIECE_ARRAY]);
|
||||
menuPiece->addAction(actions[LC_PIECE_MINIFIG_WIZARD]);
|
||||
// LC_PIECE_COPY_KEYS
|
||||
menuPiece->addSeparator();
|
||||
menuPiece->addAction(actions[LC_PIECE_GROUP]);
|
||||
menuPiece->addAction(actions[LC_PIECE_UNGROUP]);
|
||||
|
@ -1058,7 +1057,6 @@ void lcQMainWindow::updateSelectedObjects(int flags, int selectedCount, Object*
|
|||
actions[LC_EDIT_SELECT_ALL]->setEnabled(flags & LC_SEL_UNSELECTED);
|
||||
|
||||
actions[LC_PIECE_DELETE]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
||||
actions[LC_PIECE_COPY_KEYS]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
||||
actions[LC_PIECE_ARRAY]->setEnabled(flags & LC_SEL_PIECE);
|
||||
actions[LC_PIECE_HIDE_SELECTED]->setEnabled(flags & LC_SEL_PIECE);
|
||||
actions[LC_PIECE_UNHIDE_ALL]->setEnabled(flags & LC_SEL_HIDDEN);
|
||||
|
@ -1128,8 +1126,6 @@ void lcQMainWindow::updateAnimation(bool animation, bool addKeys)
|
|||
gtk_widget_set_sensitive (anim_toolbar.stop, FALSE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.anim), bAnimation);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.keys), bAddKeys);
|
||||
gpointer item = gtk_object_get_data (GTK_OBJECT (((GtkWidget*)(*main_window))), "menu_piece_copykeys");
|
||||
gtk_label_set_text (GTK_LABEL (GTK_BIN (item)->child), bAnimation ? "Copy Keys from Instructions" : "Copy Keys from Animation");
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue