(svn r14978) -Codechange: simplify the control flow of the OnClick of the settings window
This commit is contained in:
@@ -1269,8 +1269,8 @@ struct PatchesSelectionWindow : Window {
|
||||
|
||||
virtual void OnClick(Point pt, int widget)
|
||||
{
|
||||
switch (widget) {
|
||||
case PATCHSEL_OPTIONSPANEL: {
|
||||
if (widget != PATCHSEL_OPTIONSPANEL) return;
|
||||
|
||||
int y = pt.y - SETTINGTREE_TOP_OFFSET; // Shift y coordinate
|
||||
if (y < 0) return; // Clicked above first entry
|
||||
|
||||
@@ -1347,6 +1347,7 @@ struct PatchesSelectionWindow : Window {
|
||||
_left_button_clicked = false;
|
||||
}
|
||||
} break;
|
||||
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
|
||||
@@ -1365,8 +1366,6 @@ struct PatchesSelectionWindow : Window {
|
||||
ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_CONFIG_PATCHES_QUERY_CAPT, 10, 100, this, CS_NUMERAL, QSF_NONE);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnTimeout()
|
||||
|
Reference in New Issue
Block a user