mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 02:36:23 +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)
|
QLineEdit_text(LineEdit, @Result)
|
||||||
else
|
else
|
||||||
Result := '';
|
Result := '';
|
||||||
|
{$ifdef VerboseQt}
|
||||||
|
WriteLn('TQtAbstractSpinBox.GetText Result=',Result);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtAbstractSpinBox.getTextStatic: Boolean;
|
function TQtAbstractSpinBox.getTextStatic: Boolean;
|
||||||
@ -6619,6 +6622,9 @@ end;
|
|||||||
|
|
||||||
procedure TQtAbstractSpinBox.setText(const W: WideString);
|
procedure TQtAbstractSpinBox.setText(const W: WideString);
|
||||||
begin
|
begin
|
||||||
|
{$ifdef VerboseQt}
|
||||||
|
WriteLn('TQtAbstractSpinBox.SetText W=',w);
|
||||||
|
{$endif}
|
||||||
if (LineEdit <> nil) then
|
if (LineEdit <> nil) then
|
||||||
QLineEdit_setText(LineEdit, @W)
|
QLineEdit_setText(LineEdit, @W)
|
||||||
end;
|
end;
|
||||||
@ -6717,6 +6723,7 @@ var
|
|||||||
begin
|
begin
|
||||||
FillChar(Msg, SizeOf(Msg), #0);
|
FillChar(Msg, SizeOf(Msg), #0);
|
||||||
Msg.Msg := CM_TEXTCHANGED;
|
Msg.Msg := CM_TEXTCHANGED;
|
||||||
|
if not InUpdate then
|
||||||
DeliverMessage(Msg);
|
DeliverMessage(Msg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6775,6 +6782,7 @@ var
|
|||||||
begin
|
begin
|
||||||
FillChar(Msg, SizeOf(Msg), #0);
|
FillChar(Msg, SizeOf(Msg), #0);
|
||||||
Msg.Msg := CM_TEXTCHANGED;
|
Msg.Msg := CM_TEXTCHANGED;
|
||||||
|
if not InUpdate then
|
||||||
DeliverMessage(Msg);
|
DeliverMessage(Msg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -70,6 +70,8 @@ class procedure TQtWSCustomFloatSpinEdit.InternalUpdateControl(
|
|||||||
const ASpinWidget: TQtAbstractSpinBox;
|
const ASpinWidget: TQtAbstractSpinBox;
|
||||||
const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
|
const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
|
||||||
begin
|
begin
|
||||||
|
ASpinWidget.BeginUpdate;
|
||||||
|
try
|
||||||
if ASpinWidget is TQtFloatSpinBox then
|
if ASpinWidget is TQtFloatSpinBox then
|
||||||
TQtFloatSpinBox(ASpinWidget).setDecimals(ACustomFloatSpinEdit.DecimalPlaces);
|
TQtFloatSpinBox(ASpinWidget).setDecimals(ACustomFloatSpinEdit.DecimalPlaces);
|
||||||
|
|
||||||
@ -77,6 +79,9 @@ begin
|
|||||||
ASpinWidget.setMinimum(ACustomFloatSpinEdit.MinValue);
|
ASpinWidget.setMinimum(ACustomFloatSpinEdit.MinValue);
|
||||||
ASpinWidget.setMaximum(ACustomFloatSpinEdit.MaxValue);
|
ASpinWidget.setMaximum(ACustomFloatSpinEdit.MaxValue);
|
||||||
ASpinWidget.setSingleStep(ACustomFloatSpinEdit.Increment);
|
ASpinWidget.setSingleStep(ACustomFloatSpinEdit.Increment);
|
||||||
|
finally
|
||||||
|
ASpinWidget.EndUpdate;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user