Skip to content

Commit

Permalink
Update framescrollbar.cpp
Browse files Browse the repository at this point in the history
Add 'split' menu action #203
  • Loading branch information
rodlie committed Jul 2, 2024
1 parent 217d31e commit 9db2ba8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ui/widgets/framescrollbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ void FrameScrollBar::mousePressEvent(QMouseEvent *event)
const auto clearFrameOutAct = new QAction(tr("Clear Frame In/Out"), this);
const auto setMarkerAct = new QAction(tr(hasMarker ? "Remove Marker" : "Add Marker"), this);
const auto clearMarkersAct = new QAction(tr("Clear Markers"), this);
const auto splitDurationAct = new QAction(tr("Split"), this);

menu.addSeparator();
menu.addAction(setFrameInAct);
Expand All @@ -286,6 +287,8 @@ void FrameScrollBar::mousePressEvent(QMouseEvent *event)
menu.addSeparator();
menu.addAction(setMarkerAct);
menu.addAction(clearMarkersAct);
menu.addSeparator();
menu.addAction(splitDurationAct);

QAction* selectedAction = menu.exec(event->globalPos());
if (selectedAction) {
Expand Down Expand Up @@ -336,6 +339,10 @@ void FrameScrollBar::mousePressEvent(QMouseEvent *event)
if (mCurrentCanvas) {
mCurrentCanvas->clearMarkers();
}
} else if (selectedAction == splitDurationAct) {
if (mCurrentCanvas) {
mCurrentCanvas->splitAction();
}
}
}
return;
Expand Down

0 comments on commit 9db2ba8

Please sign in to comment.