mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
Fix disabled widgets sharing the same space as active widgets (#20535)
* Fix disabled widgets sharing the same space as active widgets * Add PR for reference in comment Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
This commit is contained in:
committed by
GitHub
parent
62914a39fb
commit
0b9639eb25
@@ -805,13 +805,20 @@ void WindowAlignTabs(WindowBase* w, WidgetIndex start_tab_id, WidgetIndex end_ta
|
||||
|
||||
for (i = start_tab_id; i <= end_tab_id; i++)
|
||||
{
|
||||
auto& widget = w->widgets[i];
|
||||
if (!WidgetIsDisabled(*w, i))
|
||||
{
|
||||
auto& widget = w->widgets[i];
|
||||
widget.left = x;
|
||||
widget.right = x + tab_width;
|
||||
x += tab_width + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Workaround #20535: Avoid disabled widgets from sharing the same space as active ones, otherwise
|
||||
// WindowFindWidgetFromPoint could return the disabled one, causing issues.
|
||||
widget.left = 0;
|
||||
widget.right = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user