mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-02 16:12:35 +02:00
Qt: fixed strange behaviour of QTreeWidget selection when multiselection is enabled (TListView.Style = vsReport). issue #18972
git-svn-id: trunk@30198 -
This commit is contained in:
parent
e40d070b88
commit
c6bdd569fa
@ -10358,8 +10358,10 @@ var
|
||||
AIndex: Integer;
|
||||
ASubIndex: Integer;
|
||||
begin
|
||||
if ((FSelection.Count > 0) and (FSelection.IndexOf(AItem) <> -1)) or
|
||||
(QTreeWidget_isItemSelected(QTreeWidgetH(Widget), AItem) = ASelect) then
|
||||
|
||||
if not InUpdate and
|
||||
(((FSelection.Count > 0) and (FSelection.IndexOf(AItem) <> -1)) or
|
||||
(QTreeWidget_isItemSelected(QTreeWidgetH(Widget), AItem) = ASelect)) then
|
||||
exit;
|
||||
|
||||
FillChar(Msg, SizeOf(Msg), #0);
|
||||
@ -10392,7 +10394,6 @@ begin
|
||||
Msg.NMHdr := @NMLV.hdr;
|
||||
|
||||
QTreeWidget_setItemSelected(QTreeWidgetH(Widget), AItem, ASelect);
|
||||
|
||||
if not FSyncingItems then
|
||||
DeliverMessage(Msg);
|
||||
end;
|
||||
|
@ -1258,7 +1258,7 @@ begin
|
||||
lisFocused: QtTreeWidget.setCurrentItem(TWI);
|
||||
lisSelected:
|
||||
begin
|
||||
if ALV.RowSelect and AIsSet then
|
||||
if ALV.RowSelect and AIsSet and not ALV.MultiSelect then
|
||||
QtTreeWidget.setCurrentItem(TWI);
|
||||
QtTreeWidget.setItemSelected(TWI, AIsSet);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user