diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc index c68f2bec16..f458abf644 100644 --- a/gtk2_ardour/ardour_dialog.cc +++ b/gtk2_ardour/ardour_dialog.cc @@ -42,6 +42,7 @@ ArdourDialog::ArdourDialog (const string& title, bool modal, bool use_seperator) , _sensitive (true) , proxy (nullptr) , _splash_pushed (false) + , allow_idle (true) { init (); set_position (Gtk::WIN_POS_MOUSE); @@ -52,6 +53,7 @@ ArdourDialog::ArdourDialog (Gtk::Window& parent, const string& title, bool modal , _sensitive (true) , proxy (nullptr) , _splash_pushed (false) + , allow_idle (true) { init (); set_position (Gtk::WIN_POS_CENTER_ON_PARENT); @@ -63,6 +65,10 @@ ArdourDialog::~ArdourDialog () Keyboard::the_keyboard ().focus_out_window (nullptr, this); WM::Manager::instance ().remove (proxy); proxy->explicit_delete (); +void +ArdourDialog::disallow_idle () +{ + allow_idle = false; } void @@ -70,7 +76,9 @@ ArdourDialog::on_response (int response_id) { pop_splash (); hide (); - ARDOUR::GUIIdle (); + if (allow_idle) { + ARDOUR::GUIIdle (); + } Gtk::Dialog::on_response (response_id); } diff --git a/gtk2_ardour/ardour_dialog.h b/gtk2_ardour/ardour_dialog.h index 7f34ba98dd..e3bf268176 100644 --- a/gtk2_ardour/ardour_dialog.h +++ b/gtk2_ardour/ardour_dialog.h @@ -51,6 +51,7 @@ public: void on_show (); virtual void on_response (int); void set_ui_sensitive (bool); + void disallow_idle (); protected: void pop_splash (); @@ -61,6 +62,7 @@ private: WM::ProxyTemporary* proxy; bool _splash_pushed; void init (); + bool allow_idle; static sigc::signal CloseAllDialogs; };