Don't allow wxSpinCtrl range to include negative values if base != 10 (wxMSW)
In a native up-down control hexadecimal numbers are always unsigned (see UDM_SETBASE message documentation) so we need to prevent: - Setting a range including negative values if base == 16. - Setting base != 10 if current range includes negative values. See #18805.
This commit is contained in:
@@ -26,6 +26,8 @@ extern int GetMaxValueLength(int minVal, int maxVal, int base);
|
||||
// of wxSpinCtrl is derived from wxSpinButton but uses the same algorithm.
|
||||
extern wxSize GetBestSize(const wxControl* spin, int minVal, int maxVal, int base);
|
||||
|
||||
// Helper function to check if given combination of range and base is valid.
|
||||
extern bool IsBaseCompatibleWithRange(int minVal, int maxVal, int base);
|
||||
} // namespace wxSpinCtrlImpl
|
||||
|
||||
#endif // _WX_PRIVATE_SPINCTRL_H_
|
||||
|
Reference in New Issue
Block a user