fix for a subtle bug that led to track headers not expanding as intended

now that we use action-as-state, there was no way to look up the old
mouse mode when changing into or out of internal editing. this
prevented us from queuing the redisplay of trackviews that allows the track
headers to expand when appropriate.
This commit is contained in:
Paul Davis 2025-08-14 18:48:04 -06:00
parent e467ee77f8
commit 192c7a2f9a
4 changed files with 5 additions and 1 deletions

View file

@ -1082,6 +1082,7 @@ CueEditor::mouse_mode_chosen (Editing::MouseMode m)
* left. we'll get called again with the new mode active in a
* jiffy.
*/
old_mouse_mode = m;
return;
}

View file

@ -111,6 +111,7 @@ static const gchar *_zoom_focus_strings[] = {
EditingContext::EditingContext (std::string const & name)
: rubberband_rect (0)
, old_mouse_mode (Editing::MouseObject)
, _name (name)
, within_track_canvas (false)
, pre_internal_grid_type (GridTypeBeat)

View file

@ -432,6 +432,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
virtual ArdourCanvas::GtkCanvas* get_canvas() const = 0;
virtual void mouse_mode_chosen (Editing::MouseMode) = 0;
Editing::MouseMode old_mouse_mode;
bool on_velocity_scroll_event (GdkEventScroll*);
void pre_render ();

View file

@ -132,10 +132,11 @@ Editor::mouse_mode_chosen (MouseMode m)
* left. we'll get called again with the new mode active in a
* jiffy.
*/
old_mouse_mode = m;
return;
}
const bool was_internal = internal_editing();
const bool was_internal = (old_mouse_mode == Editing::MouseDraw || old_mouse_mode == Editing::MouseContent);
/* Ben ToDo: once we have a dedicated 'region edit panel', we can store
* one snap mode in the editor canvas and another one in the editor,