View Issue Details

IDProjectCategoryView StatusLast Update
0038084LazarusLCLpublic2020-11-15 18:51
Reporterjamie philbrook Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.1 (SVN) 
Summary0038084: TTreeView calls OnCollapsing and OnCollapsed during Control destruction and node clearing
DescriptionThe TreeView is calling these events during destruction or clearing regardless of the expanded state.

if a tree is not expanded the events get called anyways and even if they were expanded they should not be getting called.

Delphi does not do this, when destroying the control these events are not called.
Steps To ReproduceDrop a Treeview on the form. implement the OnCollapsed or OnCollapsing with some notification, for example a BEEP;

Free the control or just exit the app, you will get a beep and it does not matter if the tree is expanded or not..

During the events, you can test the NODE.Deleting and it is marked for deleting.

Should the events really get called at this time ?

I tested on Windows but I think it could also be happening on others too.

TagsNo tags attached.
Fixed in Revisionr64142
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

jamie philbrook

2020-11-15 15:07

reporter   ~0126958

P.S.

 Please add some nodes with Children on them too to make this happen.

Bart Broersma

2020-11-15 15:22

developer   ~0126960

@Jamie: if you are not sure that what you report actually is a bug, then please aske on the ML before opening a ticket.

Juha Manninen

2020-11-15 16:24

developer   ~0126963

It sounds like a bug, yes.
@jamie, you have created a test application to reproduce it. Can you please upload it here.

Juha Manninen

2020-11-15 17:57

developer   ~0126967

I think I fixed it. Please test with r64142.

jamie philbrook

2020-11-15 18:10

reporter   ~0126968

@bart:

 I thought I made it clear the first time?

 I said Delphi does not do this .

 Yes its a bug! period
@Juha I will check. thanks

jamie philbrook

2020-11-15 18:17

reporter   ~0126969

Yes, it is now working correctly.

I just ran a Clear test and a destroy test, those events are no longer called during that operation..

Good job..

I'll close it if you wish ?

jamie philbrook

2020-11-15 18:18

reporter   ~0126970

btw, this issue exist on older versions too, so its been there for a while and maybe this would be one for a merge ?

Juha Manninen

2020-11-15 18:51

developer   ~0126971

Great. Resolving.
You can add the revision to be merged if you want to the wiki page. I am not sure if anybody still merges them though. There will be no more 2.0.x dot releases. The new release Lazarus 2.2 will be forked at some point.

Issue History

Date Modified Username Field Change
2020-11-15 15:05 jamie philbrook New Issue
2020-11-15 15:07 jamie philbrook Note Added: 0126958
2020-11-15 15:22 Bart Broersma Note Added: 0126960
2020-11-15 16:24 Juha Manninen Note Added: 0126963
2020-11-15 17:54 Juha Manninen Assigned To => Juha Manninen
2020-11-15 17:54 Juha Manninen Status new => assigned
2020-11-15 17:57 Juha Manninen Note Added: 0126967
2020-11-15 18:10 jamie philbrook Note Added: 0126968
2020-11-15 18:17 jamie philbrook Note Added: 0126969
2020-11-15 18:18 jamie philbrook Note Added: 0126970
2020-11-15 18:51 Juha Manninen Status assigned => resolved
2020-11-15 18:51 Juha Manninen Resolution open => fixed
2020-11-15 18:51 Juha Manninen Fixed in Revision => r64142
2020-11-15 18:51 Juha Manninen LazTarget => -
2020-11-15 18:51 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-11-15 18:51 Juha Manninen Note Added: 0126971