mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:59:20 +02:00
Qt: QDoubleSpinBox, QSpinBox do not deliver messages if InUpdate().
git-svn-id: trunk@22078 -
This commit is contained in:
parent
c96137c619
commit
8915c4816d
@ -6599,6 +6599,9 @@ begin
|
||||
QLineEdit_text(LineEdit, @Result)
|
||||
else
|
||||
Result := '';
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtAbstractSpinBox.GetText Result=',Result);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
function TQtAbstractSpinBox.getTextStatic: Boolean;
|
||||
@ -6619,6 +6622,9 @@ end;
|
||||
|
||||
procedure TQtAbstractSpinBox.setText(const W: WideString);
|
||||
begin
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtAbstractSpinBox.SetText W=',w);
|
||||
{$endif}
|
||||
if (LineEdit <> nil) then
|
||||
QLineEdit_setText(LineEdit, @W)
|
||||
end;
|
||||
@ -6717,6 +6723,7 @@ var
|
||||
begin
|
||||
FillChar(Msg, SizeOf(Msg), #0);
|
||||
Msg.Msg := CM_TEXTCHANGED;
|
||||
if not InUpdate then
|
||||
DeliverMessage(Msg);
|
||||
end;
|
||||
|
||||
@ -6775,6 +6782,7 @@ var
|
||||
begin
|
||||
FillChar(Msg, SizeOf(Msg), #0);
|
||||
Msg.Msg := CM_TEXTCHANGED;
|
||||
if not InUpdate then
|
||||
DeliverMessage(Msg);
|
||||
end;
|
||||
|
||||
|
@ -70,6 +70,8 @@ class procedure TQtWSCustomFloatSpinEdit.InternalUpdateControl(
|
||||
const ASpinWidget: TQtAbstractSpinBox;
|
||||
const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
|
||||
begin
|
||||
ASpinWidget.BeginUpdate;
|
||||
try
|
||||
if ASpinWidget is TQtFloatSpinBox then
|
||||
TQtFloatSpinBox(ASpinWidget).setDecimals(ACustomFloatSpinEdit.DecimalPlaces);
|
||||
|
||||
@ -77,6 +79,9 @@ begin
|
||||
ASpinWidget.setMinimum(ACustomFloatSpinEdit.MinValue);
|
||||
ASpinWidget.setMaximum(ACustomFloatSpinEdit.MaxValue);
|
||||
ASpinWidget.setSingleStep(ACustomFloatSpinEdit.Increment);
|
||||
finally
|
||||
ASpinWidget.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user