(svn r14978) -Codechange: simplify the control flow of the OnClick of the settings window

This commit is contained in:
rubidium
2009-01-10 19:22:05 +00:00
parent ab2ad42023
commit bf744ec651

View File

@@ -1269,8 +1269,8 @@ struct PatchesSelectionWindow : Window {
virtual void OnClick(Point pt, int widget) virtual void OnClick(Point pt, int widget)
{ {
switch (widget) { if (widget != PATCHSEL_OPTIONSPANEL) return;
case PATCHSEL_OPTIONSPANEL: {
int y = pt.y - SETTINGTREE_TOP_OFFSET; // Shift y coordinate int y = pt.y - SETTINGTREE_TOP_OFFSET; // Shift y coordinate
if (y < 0) return; // Clicked above first entry if (y < 0) return; // Clicked above first entry
@@ -1347,6 +1347,7 @@ struct PatchesSelectionWindow : Window {
_left_button_clicked = false; _left_button_clicked = false;
} }
} break; } break;
default: NOT_REACHED(); 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); ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_CONFIG_PATCHES_QUERY_CAPT, 10, 100, this, CS_NUMERAL, QSF_NONE);
} }
} }
} break;
}
} }
virtual void OnTimeout() virtual void OnTimeout()