ListView.OnData called too often on Linux in mode OwnerData.
Original Reporter info from Mantis: theo @theo222
-
Reporter name:
Original Reporter info from Mantis: theo @theo222
- Reporter name:
Description:
GTK2 calls OnData for every Item initially, even if not visible.
I think a "virtual" view should not do this.
Qt calls OnData only for the visible Items, but never stops.
It calls OnData over and over again, which might use quite a lot of CPU time, depending on what you do in this event.
Win32 works as expected.
For a test project, please see: http://bugs.freepascal.org/view.php?id=27469
The attached file OnData.zip contains the output (for gtk2, qt, win32) of the following changed method of the test project:
procedure TfrmMain.ListView1Data(Sender: TObject; Item: TListItem);
begin
Item.Caption := SList[Item.Index];
Writeln(item.index,' : ',TimeToStr(now));
end;
Mantis conversion info:
- Mantis ID: 27475
- Version: 1.3 (SVN)
- Fixed in revision: 47804 (#9caddb7e)