error-log button: acknowledge new errors w/o hiding Log

override toggle, in case new errors show up while
the log window is already visible
This commit is contained in:
Robin Gareus 2015-03-20 22:48:53 +01:00
parent 6981e0495d
commit 322ec39761
1 changed files with 11 additions and 2 deletions

View File

@ -549,12 +549,21 @@ ARDOUR_UI::feedback_alert_press (GdkEventButton *)
bool
ARDOUR_UI::error_alert_press (GdkEventButton* ev)
{
bool do_toggle = true;
if (ev->button == 1) {
if (_log_not_acknowledged == LogLevelError) {
// just acknowledge the error, don't hide the log if it's already visible
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (tact && tact->get_active()) {
do_toggle = false;
}
}
_log_not_acknowledged = LogLevelNone;
error_blink (false); // immediate acknowledge
}
// fall through to to button toggle
return false;
// maybe fall through to to button toggle
return !do_toggle;
}
void