So one of thing I’m starting to taking a look at this: https://github.com/pencil2d/pencil/issues/414
Playing around with the app, it looks like the F6 duplicate frame in combination with a pencil draw, F6 is yielded correct results. (I’m thinking it might be worth understanding what’s happening on something that’s working correctly, for when I deal with the stuff that’s broke.
So… I wanted follow the trail on what’s going on with the F6 key.. I was thinking it was going to be sometype of keypress event, but I think I found the link here:
[shortcuts] CmdNewFile=Ctrl+N CmdOpenFile=Ctrl+O CmdSaveFile=Ctrl+S CmdSaveAs=Ctrl+Shift+S CmdPrint=Ctrl+P CmdExit=Ctrl+Q CmdImportImage= CmdImportImageSequence= CmdImportSound= CmdExportXsheet=Ctrl+Alt+X CmdExportImageSequence=Ctrl+R CmdExportImage=Ctrl+Shift+R CmdExportMovie= CmdExportPalette= CmdExportSvgImage= CmdExportSound=Ctrl+I CmdUndo=Ctrl+Z CmdRedo=Ctrl+Shift+Z CmdCut=Ctrl+X CmdCopy=Ctrl+C CmdPaste=Ctrl+V CmdSelectAll=Ctrl+A CmdDeselectAll=Ctrl+D CmdClearFrame= CmdPreferences= CmdResetWindows= CmdZoomIn=Ctrl+Up CmdZoomOut=Ctrl+Down CmdRotateClockwise=R CmdRotateAntiClosewise=Z CmdResetZoomRotate=Ctrl+H CmdFlipHorizontal=Shift+H CmdFlipVertical=Shift+V CmdPreview=Alt+P CmdGrid=G CmdOnionSkinPrevious=O CmdOnionSkinNext=Alt+O CmdPlay=Return CmdLoop=Ctrl+L CmdGotoNextFrame= CmdGotoPreviousFrame= CmdGotoNextKeyFrame=. CmdGotoPreviousKeyFrame="," CmdMoveFrameForward=Ctrl+. CmdMoveFrameBackward=ctrl+"," CmdAddFrame=F7 CmdDuplicateFrame=F6 CmdRemoveFrame=Shift+F5 CmdToolMove=Q CmdToolSelect=V CmdToolBrush=B CmdToolPolyline=Y CmdToolSmudge=A CmdToolPen=P CmdToolHand=H CmdToolPencil=N CmdToolBucket=K CmdToolEyedropper=I CmdToolEraser=E CmdNewBitmapLayer=Ctrl+Alt+B CmdNewVectorLayer=Ctrl+Alt+V CmdNewSoundLayer=Ctrl+Alt+W CmdNewCameraLayer=Ctrl+Alt+C CmdDeleteCurrentLayer= CmdTogglePalette=C CmdToggleToolBox=Ctrl+1 CmdToggleToolOptions=Ctrl+2 CmdToggleColorWheel=Ctrl+3 CmdToggleColorLibrary=Ctrl+4 CmdToggleDisplayOptions=Ctrl+5 CmdToggleTimeline=Ctrl+6
I guess kb.ini file is some type of initialization file.
Anyway it’s referenced here:
So the magic search term at the moment is
// shortcuts command code #define CMD_NEW_FILE "CmdNewFile" #define CMD_OPEN_FILE "CmdOpenFile" #define CMD_SAVE_FILE "CmdSaveFile" #define CMD_SAVE_AS "CmdSaveAs" #define CMD_PRINT "CmdPrint" #define CMD_EXIT "CmdExit" #define CMD_IMPORT_IMAGE "CmdImportImage" #define CMD_IMPORT_IMAGE_SEQ "CmdImportImageSequence" #define CMD_IMPORT_MOVIE "CmdImportMovie" #define CMD_IMPORT_PALETTE "CmdImportPalette" #define CMD_IMPORT_SOUND "CmdImportSound" #define CMD_EXPORT_XSHEET "CmdExportXsheet" #define CMD_EXPORT_IMAGE_SEQ "CmdExportImageSequence" #define CMD_EXPORT_IMAGE "CmdExportImage" #define CMD_EXPORT_MOVIE "CmdExportMovie" #define CMD_EXPORT_PALETTE "CmdExportPalette" #define CMD_EXPORT_SVG "CmdExportSvgImage" #define CMD_EXPORT_SOUND "CmdExportSound" #define CMD_UNDO "CmdUndo" #define CMD_REDO "CmdRedo" #define CMD_CUT "CmdCut" #define CMD_COPY "CmdCopy" #define CMD_PASTE "CmdPaste" #define CMD_SELECT_ALL "CmdSelectAll" #define CMD_DESELECT_ALL "CmdDeselectAll" #define CMD_CLEAR_FRAME "CmdClearFrame" #define CMD_PREFERENCE "CmdPreferences" #define CMD_RESET_WINDOWS "CmdResetWindows" #define CMD_ZOOM_IN "CmdZoomIn" #define CMD_ZOOM_OUT "CmdZoomOut" #define CMD_ROTATE_CLOCK "CmdRotateClockwise" #define CMD_ROTATE_ANTI_CLOCK "CmdRotateAntiClosewise" #define CMD_RESET_ZOOM_ROTATE "CmdResetZoomRotate" #define CMD_FLIP_HORIZONTAL "CmdFlipHorizontal" #define CMD_FLIP_VERTICAL "CmdFlipVertical" #define CMD_PREVIEW "CmdPreview" #define CMD_GRID "CmdGrid" #define CMD_ONIONSKIN_PREV "CmdOnionSkinPrevious" #define CMD_ONIONSKIN_NEXT "CmdOnionSkinNext" #define CMD_PLAY "CmdPlay" #define CMD_LOOP "CmdLoop" #define CMD_GOTO_NEXT_FRAME "CmdGotoNextFrame" #define CMD_GOTO_PREV_FRAME "CmdGotoPreviousFrame" #define CMD_GOTO_NEXT_KEY_FRAME "CmdGotoNextKeyFrame" #define CMD_GOTO_PREV_KEY_FRAME "CmdGotoPreviousKeyFrame" #define CMD_ADD_FRAME "CmdAddFrame" #define CMD_DUPLICATE_FRAME "CmdDuplicateFrame" #define CMD_REMOVE_FRAME "CmdRemoveFrame" #define CMD_MOVE_FRAME_BACKWARD "CmdMoveFrameBackward" #define CMD_MOVE_FRAME_FORWARD "CmdMoveFrameForward" #define CMD_TOOL_MOVE "CmdToolMove" #define CMD_TOOL_SELECT "CmdToolSelect" #define CMD_TOOL_BRUSH "CmdToolBrush" #define CMD_TOOL_POLYLINE "CmdToolPolyline" #define CMD_TOOL_SMUDGE "CmdToolSmudge" #define CMD_TOOL_PEN "CmdToolPen" #define CMD_TOOL_HAND "CmdToolHand" #define CMD_TOOL_PENCIL "CmdToolPencil" #define CMD_TOOL_BUCKET "CmdToolBucket" #define CMD_TOOL_EYEDROPPER "CmdToolEyedropper" #define CMD_TOOL_ERASER "CmdToolEraser" #define CMD_TOGGLE_PALETTE "CmdTogglePalette" #define CMD_NEW_BITMAP_LAYER "CmdNewBitmapLayer" #define CMD_NEW_VECTOR_LAYER "CmdNewVectorLayer" #define CMD_NEW_SOUND_LAYER "CmdNewSoundLayer" #define CMD_NEW_CAMERA_LAYER "CmdNewCameraLayer" #define CMD_DELETE_CUR_LAYER "CmdDeleteCurrentLayer" #define CMD_HELP "CmdHelp" #define CMD_TOGGLE_TOOLBOX "CmdToggleToolBox" #define CMD_TOGGLE_TOOL_OPTIONS "CmdToggleToolOptions" #define CMD_TOGGLE_COLOR_WHEEL "CmdToggleColorWheel" #define CMD_TOGGLE_COLOR_LIBRARY "CmdToggleColorLibrary" #define CMD_TOGGLE_DISPLAY_OPTIONS "CmdToggleDisplayOptions" #define CMD_TOGGLE_TIMELINE "CmdToggleTimeline" #define CMD_INCREASE_SIZE "CmdIncreaseSize" #define CMD_DECREASE_SIZE "CmdDecreaseSize" // Save / Export #define LAST_FILE_PATH "LastFilePath" // Settings Group/Key Name #define PENCIL2D "Pencil" #define SHORTCUTS_GROUP "Shortcuts" #define SETTING_AUTO_SAVE "AutoSave" #define SETTING_AUTO_SAVE_NUMBER "AutosaveNumber" #define SETTING_TOOL_CURSOR "ToolCursors" #define SETTING_HIGH_RESOLUTION "HighResPosition" #define SETTING_BACKGROUND_STYLE "Background" #define SETTING_WINDOW_OPACITY "WindowOpacity" #define SETTING_WINDOW_GEOMETRY "WindowGeometry" #define SETTING_WINDOW_STATE "WindowState" #define SETTING_CURVE_SMOOTHING "CurveSmoothing" #define SETTING_DISPLAY_EFFECT "RenderEffect" #define SETTING_SHORT_SCRUB "ShortScrub" #define SETTING_FRAME_SIZE "FrameSize" #define SETTING_TIMELINE_SIZE "TimelineSize" #define SETTING_LABEL_FONT_SIZE "LabelFontSize" #define SETTING_DRAW_LABEL "DrawLabel" #define SETTING_ANTIALIAS "Antialiasing" #define SETTING_SHOW_GRID "ShowGrid" #define SETTING_COUNT "Count" #define SETTING_SHADOW "Shadow" #define SETTING_PREV_ONION "PrevOnion" #define SETTING_NEXT_ONION "NextOnion" #define SETTING_AXIS "Axis" #define SETTING_CAMERABORDER "CameraBorder" #define SETTING_INVISIBLE_LINES "InvisibleLines" #define SETTING_OUTLINES "Outlines" #define SETTING_ONION_BLUE "OnionBlue" #define SETTING_ONION_RED "OnionRed" #define SETTING_MIRROR_H "MirrorH" #define SETTING_MIRROR_V "MirrorV" #define SETTING_ONION_MAX_OPACITY "OnionMaxOpacity" #define SETTING_ONION_MIN_OPACITY "OnionMinOpacity" #define SETTING_ONION_PREV_FRAMES_NUM "OnionPrevFramesNum" #define SETTING_ONION_NEXT_FRAMES_NUM "OnionNextFramesNum" #define SETTING_ONION_TYPE "OnionType" #endif // PENCILDEF_H
I think we’re getting close
void MainWindow2::setupKeyboardShortcuts() { checkExistingShortcuts(); auto cmdKeySeq = []( QString strCommandName ) -> QKeySequence { strCommandName = QString( "shortcuts/" ) + strCommandName; QKeySequence keySequence( pencilSettings()->value( strCommandName ).toString() ); return keySequence; }; ui->actionNew->setShortcut( cmdKeySeq( CMD_NEW_FILE ) ); ui->actionOpen->setShortcut( cmdKeySeq( CMD_OPEN_FILE ) ); ui->actionSave->setShortcut( cmdKeySeq( CMD_SAVE_FILE ) ); ui->actionSave_as->setShortcut( cmdKeySeq( CMD_SAVE_AS ) ); ui->actionPrint->setShortcut( cmdKeySeq( CMD_PRINT ) ); ui->actionImport_Image->setShortcut( cmdKeySeq( CMD_IMPORT_IMAGE ) ); ui->actionImport_Image_Sequence->setShortcut( cmdKeySeq( CMD_IMPORT_IMAGE_SEQ ) ); ui->actionImport_Movie->setShortcut( cmdKeySeq( CMD_IMPORT_MOVIE ) ); ui->actionImport_Palette->setShortcut( cmdKeySeq( CMD_IMPORT_PALETTE ) ); ui->actionImport_Sound->setShortcut( cmdKeySeq( CMD_IMPORT_SOUND ) ); ui->actionExport_Image->setShortcut( cmdKeySeq( CMD_EXPORT_IMAGE ) ); ui->actionExport_Image_Sequence->setShortcut( cmdKeySeq( CMD_EXPORT_IMAGE_SEQ ) ); ui->actionExport_Movie->setShortcut( cmdKeySeq( CMD_EXPORT_MOVIE ) ); ui->actionExport_Palette->setShortcut( cmdKeySeq( CMD_EXPORT_PALETTE ) ); ui->actionExport_Svg_Image->setShortcut( cmdKeySeq( CMD_EXPORT_SVG ) ); ui->actionExport_X_sheet->setShortcut( cmdKeySeq( CMD_EXPORT_XSHEET ) ); // edit menu ui->actionUndo->setShortcut( cmdKeySeq( CMD_UNDO ) ); ui->actionRedo->setShortcut( cmdKeySeq( CMD_REDO ) ); ui->actionCut->setShortcut( cmdKeySeq( CMD_CUT ) ); ui->actionCopy->setShortcut( cmdKeySeq( CMD_COPY ) ); ui->actionPaste->setShortcut( cmdKeySeq( CMD_PASTE ) ); ui->actionClearFrame->setShortcut( cmdKeySeq( CMD_CLEAR_FRAME ) ); ui->actionSelect_All->setShortcut( cmdKeySeq( CMD_SELECT_ALL ) ); ui->actionDeselect_All->setShortcut( cmdKeySeq( CMD_DESELECT_ALL ) ); ui->actionPreference->setShortcut( cmdKeySeq( CMD_PREFERENCE ) ); ui->actionReset_Windows->setShortcut( cmdKeySeq( CMD_RESET_WINDOWS ) ); ui->actionReset_View->setShortcut( cmdKeySeq( CMD_RESET_ZOOM_ROTATE ) ); ui->actionZoom_In->setShortcut( cmdKeySeq( CMD_ZOOM_IN ) ); ui->actionZoom_Out->setShortcut( cmdKeySeq( CMD_ZOOM_OUT ) ); ui->actionRotate_Clockwise->setShortcut( cmdKeySeq( CMD_ROTATE_CLOCK ) ); ui->actionRotate_Anticlosewise->setShortcut( cmdKeySeq( CMD_ROTATE_ANTI_CLOCK ) ); ui->actionHorizontal_Flip->setShortcut( cmdKeySeq( CMD_FLIP_HORIZONTAL ) ); ui->actionVertical_Flip->setShortcut( cmdKeySeq( CMD_FLIP_VERTICAL ) ); ui->actionPreview->setShortcut( cmdKeySeq( CMD_PREVIEW ) ); ui->actionGrid->setShortcut( cmdKeySeq( CMD_GRID ) ); ui->actionOnionPrevious->setShortcut( cmdKeySeq( CMD_ONIONSKIN_PREV ) ); ui->actionOnionNext->setShortcut( cmdKeySeq( CMD_ONIONSKIN_NEXT ) ); ui->actionPlay->setShortcut( cmdKeySeq( CMD_PLAY ) ); ui->actionLoop->setShortcut( cmdKeySeq( CMD_LOOP ) ); ui->actionPrevious_Frame->setShortcut( cmdKeySeq( CMD_GOTO_PREV_FRAME ) ); ui->actionNext_Frame->setShortcut( cmdKeySeq( CMD_GOTO_NEXT_FRAME ) ); ui->actionPrev_KeyFrame->setShortcut( cmdKeySeq( CMD_GOTO_PREV_KEY_FRAME ) ); ui->actionNext_KeyFrame->setShortcut( cmdKeySeq( CMD_GOTO_NEXT_KEY_FRAME ) ); ui->actionAdd_Frame->setShortcut( cmdKeySeq( CMD_ADD_FRAME ) ); ui->actionDuplicate_Frame->setShortcut( cmdKeySeq( CMD_DUPLICATE_FRAME ) ); ui->actionRemove_Frame->setShortcut( cmdKeySeq( CMD_REMOVE_FRAME ) ); ui->actionMove_Frame_Backward->setShortcut( cmdKeySeq( CMD_MOVE_FRAME_BACKWARD ) ); ui->actionMove_Frame_Forward->setShortcut( cmdKeySeq( CMD_MOVE_FRAME_FORWARD ) ); ui->actionMove->setShortcut( cmdKeySeq( CMD_TOOL_MOVE ) ); ui->actionSelect->setShortcut( cmdKeySeq( CMD_TOOL_SELECT ) ); ui->actionBrush->setShortcut( cmdKeySeq( CMD_TOOL_BRUSH ) ); ui->actionPolyline->setShortcut( cmdKeySeq( CMD_TOOL_POLYLINE ) ); ui->actionSmudge->setShortcut( cmdKeySeq( CMD_TOOL_SMUDGE ) ); ui->actionPen->setShortcut( cmdKeySeq( CMD_TOOL_PEN ) ); ui->actionHand->setShortcut( cmdKeySeq( CMD_TOOL_HAND ) ); ui->actionPencil->setShortcut( cmdKeySeq( CMD_TOOL_PENCIL ) ); ui->actionBucket->setShortcut( cmdKeySeq( CMD_TOOL_BUCKET ) ); ui->actionEyedropper->setShortcut( cmdKeySeq( CMD_TOOL_EYEDROPPER ) ); ui->actionEraser->setShortcut( cmdKeySeq( CMD_TOOL_ERASER ) ); ui->actionTogglePalette->setShortcut( cmdKeySeq( CMD_TOGGLE_PALETTE ) ); //mScribbleArea->getPopupPalette()->closeButton->setText( tr("close/toggle (") + pencilSettings()->value( QString( "shortcuts/" ) + CMD_TOGGLE_PALETTE ).toString() + ")" ); //mScribbleArea->getPopupPalette()->closeButton->setShortcut( cmdKeySeq( CMD_TOGGLE_PALETTE ) ); ui->actionNew_Bitmap_Layer->setShortcut( cmdKeySeq( CMD_NEW_BITMAP_LAYER ) ); ui->actionNew_Vector_Layer->setShortcut( cmdKeySeq( CMD_NEW_VECTOR_LAYER ) ); ui->actionNew_Camera_Layer->setShortcut( cmdKeySeq( CMD_NEW_CAMERA_LAYER ) ); ui->actionNew_Sound_Layer->setShortcut( cmdKeySeq( CMD_NEW_SOUND_LAYER ) ); mToolBox->toggleViewAction()->setShortcut( cmdKeySeq( CMD_TOGGLE_TOOLBOX ) ); mToolOptions->toggleViewAction()->setShortcut( cmdKeySeq( CMD_TOGGLE_TOOL_OPTIONS ) ); mColorWheel->toggleViewAction()->setShortcut( cmdKeySeq( CMD_TOGGLE_COLOR_WHEEL ) ); mColorPalette->toggleViewAction()->setShortcut( cmdKeySeq( CMD_TOGGLE_COLOR_LIBRARY ) ); mTimeLine->toggleViewAction()->setShortcut( cmdKeySeq( CMD_TOGGLE_TIMELINE ) ); mDisplayOptionWidget->toggleViewAction()->setShortcut( cmdKeySeq( CMD_TOGGLE_DISPLAY_OPTIONS ) ); ui->actionHelp->setShortcut( cmdKeySeq( CMD_HELP ) ); }
Okkk… Now I think I found it.
void MainWindow2::createMenus() { // ---------- File Menu ------------- connect( ui->actionNew, &QAction::triggered, this, &MainWindow2::newDocument ); connect( ui->actionOpen, &QAction::triggered, this, &MainWindow2::openDocument ); connect( ui->actionSave_as, &QAction::triggered, this, &MainWindow2::saveAsNewDocument ); connect( ui->actionSave, &QAction::triggered, this, &MainWindow2::saveDocument ); connect( ui->actionExit, &QAction::triggered, this, &MainWindow2::close ); /// --- Export Menu --- //connect( ui->actionExport_X_sheet, &QAction::triggered, mEditor, &Editor::exportX ); connect( ui->actionExport_Image, &QAction::triggered, this, &MainWindow2::exportImage ); connect( ui->actionExport_Image_Sequence, &QAction::triggered, this, &MainWindow2::exportImageSequence ); connect( ui->actionExport_Movie, &QAction::triggered, this, &MainWindow2::exportMovie ); connect( ui->actionExport_Palette, &QAction::triggered, this, &MainWindow2::exportPalette ); /// --- Import Menu --- //connect( ui->actionExport_Svg_Image, &QAction::triggered, editor, &Editor::saveSvg ); connect( ui->actionImport_Image, &QAction::triggered, this, &MainWindow2::importImage ); connect( ui->actionImport_Image_Sequence, &QAction::triggered, this, &MainWindow2::importImageSequence ); connect( ui->actionImport_Movie, &QAction::triggered, this, &MainWindow2::importMovie ); connect( ui->actionImport_Sound, &QAction::triggered, mCommands, &CommandCenter::importSound ); connect( ui->actionImport_Palette, &QAction::triggered, this, &MainWindow2::importPalette ); /// --- Edit Menu --- ui->actionPreference->setMenuRole( QAction::PreferencesRole ); connect( ui->actionUndo, &QAction::triggered, mEditor, &Editor::undo ); connect( ui->actionRedo, &QAction::triggered, mEditor, &Editor::redo ); connect( ui->actionCut, &QAction::triggered, mEditor, &Editor::cut ); connect( ui->actionCopy, &QAction::triggered, mEditor, &Editor::copy ); connect( ui->actionPaste, &QAction::triggered, mEditor, &Editor::paste ); connect( ui->actionClearFrame, &QAction::triggered, mEditor, &Editor::clearCurrentFrame ); connect( ui->actionFlip_X, &QAction::triggered, mCommands, &CommandCenter::flipX ); connect( ui->actionFlip_Y, &QAction::triggered, mCommands, &CommandCenter::flipY ); connect( ui->actionSelect_All, &QAction::triggered, mEditor, &Editor::selectAll ); connect( ui->actionDeselect_All, &QAction::triggered, mEditor, &Editor::deselectAll ); connect( ui->actionPreference, &QAction::triggered, [=] { preferences(); } ); ui->actionRedo->setEnabled( false ); /// --- Layer Menu --- connect( ui->actionNew_Bitmap_Layer, &QAction::triggered, mCommands, &CommandCenter::addNewBitmapLayer ); connect( ui->actionNew_Vector_Layer, &QAction::triggered, mCommands, &CommandCenter::addNewVectorLayer ); connect( ui->actionNew_Sound_Layer, &QAction::triggered, mCommands, &CommandCenter::addNewSoundLayer ); connect( ui->actionNew_Camera_Layer, &QAction::triggered, mCommands, &CommandCenter::addNewCameraLayer ); connect( ui->actionDelete_Current_Layer, &QAction::triggered, mEditor->layers(), &LayerManager::deleteCurrentLayer ); /// --- View Menu --- connect( ui->actionZoom_In, &QAction::triggered, mCommands, &CommandCenter::ZoomIn ); connect( ui->actionZoom_Out, &QAction::triggered, mCommands, &CommandCenter::ZoomOut ); connect( ui->actionRotate_Clockwise, &QAction::triggered, mCommands, &CommandCenter::rotateClockwise ); connect( ui->actionRotate_Anticlosewise, &QAction::triggered, mCommands, &CommandCenter::rotateCounterClockwise ); connect( ui->actionReset_Windows, &QAction::triggered, this, &MainWindow2::dockAllSubWidgets ); connect( ui->actionReset_View, &QAction::triggered, mEditor->view(), &ViewManager::resetView ); connect( ui->actionHorizontal_Flip, &QAction::triggered, mEditor, &Editor::toggleMirror ); connect( ui->actionVertical_Flip, &QAction::triggered, mEditor, &Editor::toggleMirrorV ); ui->actionPreview->setEnabled( false ); //# connect(previewAct, SIGNAL(triggered()), editor, SLOT(getCameraLayer()));//TODO: Preview view setMenuActionChecked( ui->actionGrid, mEditor->preference()->isOn( SETTING::GRID ) ); connect( ui->actionGrid, &QAction::triggered, mCommands, &CommandCenter::showGrid ); connect( ui->actionOnionPrevious, &QAction::triggered, mEditor, &Editor::toggleOnionPrev ); connect( ui->actionOnionNext, &QAction::triggered, mEditor, &Editor::toggleOnionNext ); connect( ui->actionMultiLayerOnionSkin, &QAction::triggered, mEditor, &Editor::toggleMultiLayerOnionSkin ); //connect( mEditor, &Editor::onionPrevChanged, ui->actionOnionPrevious, &QAction::setChecked ); //connect( mEditor, &Editor::onionNextChanged, ui->actionOnionNext, &QAction::setChecked ); connect( mEditor, SIGNAL(multiLayerOnionSkinChanged(bool)), ui->actionMultiLayerOnionSkin, SLOT(setChecked(bool))); /// --- Animation Menu --- PlaybackManager* pPlaybackManager = mEditor->playback(); connect( ui->actionPlay, &QAction::triggered, mCommands, &CommandCenter::PlayStop ); connect( ui->actionLoop, &QAction::triggered, pPlaybackManager, &PlaybackManager::setLooping ); connect( ui->actionLoopControl, &QAction::triggered, pPlaybackManager, &PlaybackManager::enableRangedPlayback ); connect( pPlaybackManager, &PlaybackManager::loopStateChanged, ui->actionLoop, &QAction::setChecked ); connect( pPlaybackManager, &PlaybackManager::rangedPlaybackStateChanged, ui->actionLoopControl, &QAction::setChecked ); connect(ui->actionAdd_Frame, &QAction::triggered, mEditor, &Editor::addNewKey ); connect(ui->actionRemove_Frame, &QAction::triggered, mEditor, &Editor::removeKey ); //connect(ui->actionNext_Frame, &QAction::triggered, m_pEditor, &Editor::playNextFrame ); //connect(ui->actionPrevious_Frame, &QAction::triggered, m_pEditor, &Editor::playPrevFrame ); connect(ui->actionNext_KeyFrame, &QAction::triggered, mEditor, &Editor::scrubNextKeyFrame ); connect(ui->actionPrev_KeyFrame, &QAction::triggered, mEditor, &Editor::scrubPreviousKeyFrame ); connect(ui->actionDuplicate_Frame, &QAction::triggered, mEditor, &Editor::duplicateKey ); connect(ui->actionMove_Frame_Forward, &QAction::triggered, mEditor, &Editor::moveFrameForward ); //HERE connect(ui->actionMove_Frame_Backward, &QAction::triggered, mEditor, &Editor::moveFrameBackward ); /// --- Tool Menu --- connect(ui->actionMove, &QAction::triggered, mToolBox, &ToolBoxWidget::moveOn ); connect(ui->actionSelect, &QAction::triggered, mToolBox, &ToolBoxWidget::selectOn ); connect(ui->actionBrush, &QAction::triggered, mToolBox, &ToolBoxWidget::brushOn ); connect(ui->actionPolyline, &QAction::triggered, mToolBox, &ToolBoxWidget::polylineOn ); connect(ui->actionSmudge, &QAction::triggered, mToolBox, &ToolBoxWidget::smudgeOn ); connect(ui->actionPen, &QAction::triggered, mToolBox, &ToolBoxWidget::penOn ); connect(ui->actionHand, &QAction::triggered, mToolBox, &ToolBoxWidget::handOn ); connect(ui->actionPencil, &QAction::triggered, mToolBox, &ToolBoxWidget::pencilOn ); connect(ui->actionBucket, &QAction::triggered, mToolBox, &ToolBoxWidget::bucketOn ); connect(ui->actionEyedropper, &QAction::triggered, mToolBox, &ToolBoxWidget::eyedropperOn ); connect(ui->actionEraser, &QAction::triggered, mToolBox, &ToolBoxWidget::eraserOn ); connect(ui->actionTogglePalette, &QAction::triggered, mScribbleArea,&ScribbleArea::togglePopupPalette ); connect(ui->actionResetToolsDefault, &QAction::triggered, mEditor->tools(), &ToolManager::resetAllTools ); /// --- Window Menu --- QMenu* winMenu = ui->menuWindows; QAction* actions[] = { mToolBox->toggleViewAction(), mToolOptions->toggleViewAction(), mColorWheel->toggleViewAction(), mColorPalette->toggleViewAction(), mTimeLine->toggleViewAction(), mDisplayOptionWidget->toggleViewAction() }; winMenu->clear(); for ( QAction* action : actions ) { action->setMenuRole( QAction::NoRole ); winMenu->addAction( action ); } /// --- Help Menu --- connect( ui->actionHelp, &QAction::triggered, this, &MainWindow2::helpBox); connect( ui->actionAbout, &QAction::triggered, this, &MainWindow2::aboutPencil ); // --------------- Menus ------------------ mRecentFileMenu = new RecentFileMenu( tr("Open Recent"), this ); mRecentFileMenu->loadFromDisk(); ui->menuFile->insertMenu( ui->actionSave, mRecentFileMenu ); connect( mRecentFileMenu, &RecentFileMenu::loadRecentFile, this, &MainWindow2::openFile ); //connect( ui->menuEdit, SIGNAL( aboutToShow() ), this, SLOT( undoActSetText() ) ); //connect( ui->menuEdit, SIGNAL( aboutToHide() ), this, SLOT( undoActSetEnabled() ) ); }
void Editor::duplicateKey() { Layer* layer = mObject->getLayer( layers()->currentLayerIndex() ); if ( layer != NULL ) { if ( layer->type() == Layer::VECTOR || layer->type() == Layer::BITMAP ) { // Will copy the selection if any or the entire image if there is none // if(!mScribbleArea->somethingSelected) { mScribbleArea->selectAll(); } copy(); addNewKey(); paste(); mScribbleArea->setModified( layers()->currentLayerIndex(), currentFrame() ); mScribbleArea->update(); } } }
I just did some testing and everything within this routine is functioning properly.
(This seemed like more work than it should have been)
My think the next step is to see where pasting is occuring. The critters are laying in there some where.
(Well the morning is blown and nothing really fixed yet.)
I think my next steps are probably to isolate the wacko behavior and put a break point on paste() so I can see what’s going on.