Arrangement Sidebar: follow-edits locates to selected section

This commit is contained in:
Ben Loftis 2023-09-07 07:46:22 -05:00 committed by Robin Gareus
parent d2b083f385
commit b6e9f37007
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -30,6 +30,7 @@
#include "keyboard.h"
#include "main_clock.h"
#include "public_editor.h"
#include "ui_config.h"
#include "utils.h"
#include "pbd/i18n.h"
@ -233,6 +234,11 @@ EditorSections::selection_changed ()
Selection& s (PublicEditor::instance ().get_selection ());
s.clear ();
s.set (start, end);
if (UIConfiguration::instance ().get_follow_edits ()) {
_session->request_locate (start.samples());
}
_selection_change.unblock ();
}