diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 184cb77d52..ff77387ce1 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -271,8 +271,10 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual framecnt_t current_page_samples() const = 0; virtual double visible_canvas_height () const = 0; virtual void temporal_zoom_step (bool coarser) = 0; - virtual void ensure_time_axis_view_is_visible (const TimeAxisView& tav, bool at_top = false) { - _ensure_time_axis_view_is_visible (tav, at_top); + /* The virtual version, without a default argument, is protected below. + */ + void ensure_time_axis_view_is_visible (TimeAxisView const & tav, bool at_top = false) { + _ensure_time_axis_view_is_visible (tav, at_top); } virtual void override_visible_track_count () = 0; virtual void scroll_tracks_down_line () = 0; @@ -420,7 +422,12 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi PBD::Signal0 MouseModeChanged; protected: - virtual void _ensure_time_axis_view_is_visible (const TimeAxisView& tav, bool at_top) = 0; + /* This _ variant of ensure_time_axis_view_is_visible exists because + C++ doesn't really like default values for virtual methods. So the + public version is non-virtual, with a default value; the virtual + (and protected) method here does not have a default value. + */ + virtual void _ensure_time_axis_view_is_visible (TimeAxisView const & tav, bool at_top) = 0; }; #endif // __gtk_ardour_public_editor_h__