change return type of Editor::process_redisplay_track_views() to bool

This allows it to be used in an idle callback. If we use
::redisplay_track_views() directly, we do not disconnect the idle
connection. This will happen automatically since the callback will return
false, but it seems better to explicit about this. Even better would be to use
::connect_once() but this may not be available in the version of glibmm that we
are using at present.
This commit is contained in:
Paul Davis 2022-04-05 18:04:30 -06:00
parent f2e6798e66
commit da20e4ed60
2 changed files with 3 additions and 9 deletions

View File

@ -5621,20 +5621,15 @@ Editor::queue_redisplay_track_views ()
}
}
void
bool
Editor::process_redisplay_track_views ()
{
if (_tvl_redisplay_connection.connected ()) {
_tvl_redisplay_connection.disconnect ();
redisplay_track_views ();
}
}
void
Editor::redisplay_track_views_now ()
{
_tvl_redisplay_connection.disconnect ();
redisplay_track_views ();
return false;
}
void

View File

@ -1242,8 +1242,7 @@ private:
Gtk::VBox list_vpacker;
void queue_redisplay_track_views ();
void process_redisplay_track_views ();
void redisplay_track_views_now ();
bool process_redisplay_track_views ();
bool redisplay_track_views (); // do not call this directly, use above wrappers
bool _tvl_no_redisplay;