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:
parent
f2e6798e66
commit
da20e4ed60
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user