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:
paul 2009-03-07 18:28:28 +00:00
parent 467d8360d8
commit dd1e90c57b
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;