mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-02 19:38:18 +02:00
Qt: TQtTreeWidget - do not send changed signal while adding items enclosed by BeginUpdate() & EndUpdate().
git-svn-id: trunk@24297 -
This commit is contained in:
parent
c1327ba16e
commit
1b3de30b4c
@ -8631,6 +8631,7 @@ procedure TQtTreeWidget.SignalItemChanged(item: QTreeWidgetItemH; column: Intege
|
||||
var
|
||||
Msg: TLMessage;
|
||||
begin
|
||||
if InUpdate then exit;
|
||||
FillChar(Msg, SizeOf(Msg), #0);
|
||||
Msg.Msg := LM_CHANGED;
|
||||
DeliverMessage(Msg);
|
||||
|
@ -1194,6 +1194,7 @@ begin
|
||||
if not WSCheckHandleAllocated(ALV, 'BeginUpdate') then
|
||||
Exit;
|
||||
QtTreeWidget := TQtTreeWidget(ALV.Handle);
|
||||
QtTreeWidget.BeginUpdate;
|
||||
QtTreeWidget.setUpdatesEnabled(False);
|
||||
end;
|
||||
|
||||
@ -1205,6 +1206,9 @@ begin
|
||||
Exit;
|
||||
QtTreeWidget := TQtTreeWidget(ALV.Handle);
|
||||
QtTreeWidget.setUpdatesEnabled(True);
|
||||
QtTreeWidget.EndUpdate;
|
||||
if not QtTreeWidget.InUpdate then
|
||||
QtTreeWidget.Update(nil);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user