From 74670d278952384133703ee8b7a957cbf8a470ca Mon Sep 17 00:00:00 2001 From: John Emmas Date: Fri, 26 Feb 2021 13:02:51 +0000 Subject: [PATCH] Derive some functions from RecInfoBox::update() (in the derived classes) For whatever reason, MSVC doesn't like us connecting so many signals to 'RecInfoBox::update()' (crashes the Debug build) --- gtk2_ardour/rec_info_box.cc | 18 ++++++++++++++++++ gtk2_ardour/rec_info_box.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/gtk2_ardour/rec_info_box.cc b/gtk2_ardour/rec_info_box.cc index 98a08f879f..3d1cfd3951 100644 --- a/gtk2_ardour/rec_info_box.cc +++ b/gtk2_ardour/rec_info_box.cc @@ -168,6 +168,12 @@ DurationInfoBox::render (Cairo::RefPtr const& cr, cairo_rectangl _layout_value->show_in_cairo_context (cr); } +void +DurationInfoBox::update () +{ + RecInfoBox::update (); +} + /* ****************************************************************************/ void @@ -246,6 +252,12 @@ XrunInfoBox::render (Cairo::RefPtr const& cr, cairo_rectangle_t* _layout_value->show_in_cairo_context (cr); } +void +XrunInfoBox::update () +{ + RecInfoBox::update (); +} + /* ****************************************************************************/ void @@ -363,3 +375,9 @@ RemainInfoBox::render (Cairo::RefPtr const& cr, cairo_rectangle_ cr->move_to (.5 * (ww - w), hh - 4 - h); _layout_value->show_in_cairo_context (cr); } + +void +RemainInfoBox::update () +{ + RecInfoBox::update (); +} diff --git a/gtk2_ardour/rec_info_box.h b/gtk2_ardour/rec_info_box.h index 7d16401f53..3fdcf312eb 100644 --- a/gtk2_ardour/rec_info_box.h +++ b/gtk2_ardour/rec_info_box.h @@ -57,6 +57,7 @@ public: protected: void render (Cairo::RefPtr const&, cairo_rectangle_t*); void dpi_reset (); + virtual void update (); private: void rec_state_changed (); @@ -67,6 +68,7 @@ class XrunInfoBox : public RecInfoBox { public: virtual void set_session (ARDOUR::Session*); + virtual void update (); protected: void render (Cairo::RefPtr const&, cairo_rectangle_t*); @@ -81,6 +83,8 @@ public: protected: void render (Cairo::RefPtr const&, cairo_rectangle_t*); void dpi_reset (); + virtual void update (); + private: void count_recenabled_streams (ARDOUR::Route&); uint32_t _rec_enabled_streams;