mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-15 02:30:32 +01:00
utilities: Fix CheckedStaticBox behaviour
Avoid enabling the child windows when SetValue is called if the window is currently disabled. Also continue processing the checkbox event after it has been handled, which allows the event to propagate to the parent window.
This commit is contained in:
1 parent
ff68ad61e7
commit
629bb23832
1 file changed
+2
-1
@@ -35,6 +35,7 @@ CheckedStaticBox::CheckedStaticBox(wxWindow *parent, int orientation, const wxSt
|
||||
void CheckedStaticBox::MainToggle_Click(wxCommandEvent &evt)
|
||||
{
|
||||
SetValue(evt.IsChecked());
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
// Sets the main checkbox status, and enables/disables all child controls
|
||||
@@ -46,7 +47,7 @@ void CheckedStaticBox::SetValue(bool val)
|
||||
for (wxWindowList::iterator iter = list.begin(); iter != list.end(); ++iter) {
|
||||
wxWindow *current = *iter;
|
||||
if (current != &ThisToggle)
|
||||
current->Enable(val);
|
||||
current->Enable(IsEnabled() && val);
|
||||
}
|
||||
ThisToggle.SetValue(val);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user