Commit c435bd42 authored by Julius Künzel's avatar Julius Künzel
Browse files

Show edit dialog on guide creation via "Add/Remove Guide"

Fixes #1130

If you want to add a guide quickly without the dialog use the "Add
marker/guide quickly" action or double click on the guide head region
parent eb3dec03
......@@ -2741,7 +2741,7 @@ void MainWindow::slotAddMarkerGuideQuickly()
void MainWindow::slotAddGuide()
{
getMainTimeline()->controller()->switchGuide();
getMainTimeline()->controller()->switchGuide(-1, false, true);
}
void MainWindow::slotInsertSpace()
......
......@@ -1197,7 +1197,7 @@ bool TimelineController::moveGuidesInRange(int start, int end, int offset, Fun &
return pCore->currentDoc()->getGuideModel()->moveMarkers(guides, fromPos, toPos, undo, redo);
}
void TimelineController::switchGuide(int frame, bool deleteOnly)
void TimelineController::switchGuide(int frame, bool deleteOnly, bool showGui)
{
bool markerFound = false;
if (frame == -1) {
......@@ -1210,7 +1210,12 @@ void TimelineController::switchGuide(int frame, bool deleteOnly)
return;
}
GenTime pos(frame, pCore->getCurrentFps());
pCore->currentDoc()->getGuideModel()->addMarker(pos, i18n("guide"));
if(showGui) {
pCore->currentDoc()->getGuideModel()->editMarkerGui(pos, qApp->activeWindow(), true);
} else {
pCore->currentDoc()->getGuideModel()->addMarker(pos, i18n("guide"));
}
} else {
pCore->currentDoc()->getGuideModel()->removeMarker(marker.time());
}
......
......@@ -326,7 +326,7 @@ public:
/** @brief Add a timeline guide
*/
Q_INVOKABLE void switchGuide(int frame = -1, bool deleteOnly = false);
Q_INVOKABLE void switchGuide(int frame = -1, bool deleteOnly = false, bool showGui = false);
/** @brief Request monitor refresh
*/
Q_INVOKABLE void requestRefresh();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment