Sync SessionController::remove_marker_at_playhead() with Editor

This commit is contained in:
David Robillard 2021-06-17 11:07:08 -04:00
parent 30f5e50f85
commit c4a8dfddfe
2 changed files with 6 additions and 4 deletions

View file

@ -74,7 +74,7 @@ public:
/* Markers */ /* Markers */
void add_marker (const std::string& = std::string ()); void add_marker (const std::string& = std::string ());
void remove_marker_at_playhead (); bool remove_marker_at_playhead ();
/* Locating */ /* Locating */

View file

@ -355,13 +355,13 @@ SessionController::add_marker (const std::string& markername)
_session->commit_reversible_command (); _session->commit_reversible_command ();
} }
void bool
SessionController::remove_marker_at_playhead () SessionController::remove_marker_at_playhead ()
{ {
bool removed = false;
if (_session) { if (_session) {
// set up for undo // set up for undo
XMLNode& before = _session->locations ()->get_state (); XMLNode& before = _session->locations ()->get_state ();
bool removed = false;
// find location(s) at this time // find location(s) at this time
Locations::LocationList locs; Locations::LocationList locs;
@ -388,6 +388,8 @@ SessionController::remove_marker_at_playhead ()
_session->commit_reversible_command (); _session->commit_reversible_command ();
} }
} }
return removed;
} }
/* Locating */ /* Locating */