View Issue Details

IDProjectCategoryView StatusLast Update
0031681LazarusLCLpublic2017-05-29 20:55
ReporterEric HeijnenAssigned ToMichl 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOS7OS Version7601
Product Version1.6.4Product Build54278 
Target Version1.8Fixed in Version1.9 (SVN) 
Summary0031681: Non-standard scrolling behaviour on selecting in multiline treeview
DescriptionWhen you have a treeview with multiselect and select the first entry, then scroll down a bit halfway and shift select the top item in the treeview, it will scroll the treeview so the last selected item will be at the bottom of the screen
Steps To Reproducein the example:
select "2"
scroll down to 200 so 200 is at the top of the visible list
hold shift and select it.

Now 200 will be at the bottom of the list
TagsNo tags attached.
Fixed in Revisionr55122
LazTarget-
Widgetset
Attached Files
  • example.zip (2,304 bytes)
  • tvselection.patch (597 bytes)
    Index: treeview.inc
    ===================================================================
    --- treeview.inc   (wersja 54784)
    +++ treeview.inc   (kopia robocza)
    @@ -2724,7 +2724,7 @@
         //select again
         GetNext := (FirstNode.Index <= Node.Index);
         I := FirstNode;
    -    I.Selected:=True;
    +    I.MultiSelected:=True;
         while (I<>Node) do
         begin
           if GetNext then
    @@ -2732,7 +2732,7 @@
           else
             I:=I.GetPrevSibling;
           if I=nil then Break;
    -      I.Selected:=True;
    +      I.MultiSelected:=True;
         end;
     
         FStartMultiSelected := FirstNode; 
    tvselection.patch (597 bytes)
  • test.zip (1,974 bytes)

Relationships

related to 0019006 resolvedJuha Manninen TTreeView does not scroll on drag-n-drop 
related to 0031477 assignedMichl Unable to remove selected state of TreeView item 

Activities

Eric Heijnen

2017-04-19 20:20

reporter  

example.zip (2,304 bytes)

Eric Heijnen

2017-04-19 20:31

reporter   ~0099689

expected behavior would be : No scrolling and just select the new item

Eric Heijnen

2017-05-01 15:41

reporter  

tvselection.patch (597 bytes)
Index: treeview.inc
===================================================================
--- treeview.inc   (wersja 54784)
+++ treeview.inc   (kopia robocza)
@@ -2724,7 +2724,7 @@
     //select again
     GetNext := (FirstNode.Index <= Node.Index);
     I := FirstNode;
-    I.Selected:=True;
+    I.MultiSelected:=True;
     while (I<>Node) do
     begin
       if GetNext then
@@ -2732,7 +2732,7 @@
       else
         I:=I.GetPrevSibling;
       if I=nil then Break;
-      I.Selected:=True;
+      I.MultiSelected:=True;
     end;
 
     FStartMultiSelected := FirstNode; 
tvselection.patch (597 bytes)

Eric Heijnen

2017-05-01 15:42

reporter   ~0100043

applied a patch that may fix the issues. (not sure if it adds new ones)

Michl

2017-05-29 20:53

developer  

test.zip (1,974 bytes)

Michl

2017-05-29 20:55

developer   ~0100734

I tested the behaviour in Delphi. With the patch it is identical.

Applied the patch in trunk revision 55122. Thank you!

Please test and close if OK.

Issue History

Date Modified Username Field Change
2017-04-19 20:20 Eric Heijnen New Issue
2017-04-19 20:20 Eric Heijnen File Added: example.zip
2017-04-19 20:31 Eric Heijnen Note Added: 0099689
2017-04-19 22:15 Juha Manninen Relationship added related to 0019006
2017-05-01 15:41 Eric Heijnen File Added: tvselection.patch
2017-05-01 15:42 Eric Heijnen Note Added: 0100043
2017-05-01 19:43 Michl Assigned To => Michl
2017-05-01 19:43 Michl Status new => assigned
2017-05-01 19:43 Michl Relationship added related to 0031477
2017-05-29 20:53 Michl File Added: test.zip
2017-05-29 20:55 Michl Fixed in Revision => r55122
2017-05-29 20:55 Michl LazTarget => -
2017-05-29 20:55 Michl Note Added: 0100734
2017-05-29 20:55 Michl Status assigned => resolved
2017-05-29 20:55 Michl Fixed in Version => 1.9 (SVN)
2017-05-29 20:55 Michl Resolution open => fixed
2017-05-29 20:55 Michl Target Version => 1.8