mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 22:51:02 +02:00
lcl: handle SpinEdit.MinValue = SpinEdit.MaxValue properly (based on patch of Bart Broersma, fixes bug #0013273)
git-svn-id: trunk@18913 -
This commit is contained in:
parent
467d8360d8
commit
dd1e90c57b
@ -173,7 +173,7 @@ end;
|
||||
function TCustomFloatSpinEdit.GetLimitedValue(const AValue: Double): Double;
|
||||
begin
|
||||
Result := AValue;
|
||||
if FMaxValue > FMinValue then
|
||||
if FMaxValue >= FMinValue then
|
||||
begin
|
||||
if Result < FMinValue then Result := FMinValue;
|
||||
if Result > FMaxValue then Result := FMaxValue;
|
||||
|
@ -135,7 +135,7 @@ begin
|
||||
wHandle := ACustomFloatSpinEdit.Handle;
|
||||
SpinWidget:=GTK_SPIN_BUTTON(Pointer(wHandle));
|
||||
|
||||
if ACustomFloatSpinEdit.MaxValue > ACustomFloatSpinEdit.MinValue then
|
||||
if ACustomFloatSpinEdit.MaxValue >= ACustomFloatSpinEdit.MinValue then
|
||||
begin
|
||||
AMin := ACustomFloatSpinEdit.MinValue;
|
||||
AMax := ACustomFloatSpinEdit.MaxValue;
|
||||
|
@ -133,7 +133,7 @@ begin
|
||||
wHandle := ACustomFloatSpinEdit.Handle;
|
||||
SpinWidget:=GTK_SPIN_BUTTON(Pointer(wHandle));
|
||||
|
||||
if ACustomFloatSpinEdit.MaxValue > ACustomFloatSpinEdit.MinValue then
|
||||
if ACustomFloatSpinEdit.MaxValue >= ACustomFloatSpinEdit.MinValue then
|
||||
begin
|
||||
AMin := ACustomFloatSpinEdit.MinValue;
|
||||
AMax := ACustomFloatSpinEdit.MaxValue;
|
||||
|
Loading…
Reference in New Issue
Block a user