diff --git a/src/gui/widgets/toggle_button.cpp b/src/gui/widgets/toggle_button.cpp index 856ac7a641f4..aae27d53c886 100644 --- a/src/gui/widgets/toggle_button.cpp +++ b/src/gui/widgets/toggle_button.cpp @@ -121,7 +121,15 @@ void toggle_button::set_value(const unsigned selected) // Check for get_window() is here to prevent the callback from // being called when the initial value is set. - if(callback_state_change_ && get_window() != nullptr) { + // + // TODO: see if this is necessary with the signal handler. + if(!get_window()) { + return; + } + + fire(event::NOTIFY_MODIFIED, *this, nullptr); + + if(callback_state_change_) { callback_state_change_(*this); } }