View Issue Details

IDProjectCategoryView StatusLast Update
0019615LazarusDatabasepublic2011-07-03 14:09
ReporterMax Vlasov Assigned ToJesus Reyes  
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Fixed in Version0.9.31 (SVN) 
Summary0019615: TDBGrid vertical scroller sometimes unexpectedly jumps to the start position
DescriptionIf a dataset is sequential (report IsSequential) and user uses either vertical or horizontal scroller, the vertical scroller may temporary jump to the start position (top)

This issue appeared with my own TDataSet ancestor, when dragging and releasing the scroller led to this jump on both Windows and Linux. But I also find that a similar issue can be reproduced with project \examples\address_book\addrbook.lpi, appearing in the Lazarus image

Steps to reproduce

- run the program (addrbook)
- decrease the width of the program so the horizontal scrolling in the upper grid appears
- scroll down to some place when the vertical scroller is in the middle of the scroll area (for example when MTH_NAME=January)
- click anything in the horizontal scrolling (button or area)
Now the vertical one jumps to the top (=0). To return to normal (expected) state click at some nearby line (but not the same)
Additional InformationLooking at the sources and after some debugging I noticed that usually the problem appears when the procedure TCustomGrid.UpdateScrollbarPos is called. As I suppose TDBGrid overrides much code of TCustomGrid and don't expect many code fragments to be executed. Neverthelesss sometimes this method (TCustomGrid.UpdateScrollbarPos) is called and ScrollBarPosition from it changes the position to top (=0)
TagsNo tags attached.
Fixed in Revision31369,31420
WidgetsetGTK 2, Win32/Win64
Attached Files


Jesus Reyes

2011-06-23 19:22

developer   ~0049339

The addressbook example in my Lazarus install do not have more than 3 records, and no record has MTH_NAME field, so no record matches MTH_NAME=January, could you please remove all unneeded binaries and attach the test project (even if you found it in lazarus dir) to this report.

Max Vlasov

2011-06-23 21:02

reporter   ~0049342

Sorry, this was my fault, actually the project is \examples\database\dblookup\project1.lpi. I checked several and forgot that it was a different one. Is this one ok for you or should I still attach the project?

Jesus Reyes

2011-06-23 21:34

developer   ~0049343

I see and I can reproduce it, what is more, here even the risizing action moves the scrollbar to top, just do locate the january record and then resize the form.

I will take it from here, thanks.

Jesus Reyes

2011-06-23 21:36

developer   ~0049344

This is even a regresion as I had the dblookup example compiled from some previous revision and it doesn't present this problem.

Max Vlasov

2011-06-23 21:47

reporter   ~0049345

Yes, I also see how the resizing affects the scroller. If this is a regression bug, maybe it will be easier to fix. You know, DBGrids, and Grids are very complex units. Tracking what depends on what is a real challenge :)

Christian Ortiz

2011-06-24 03:59

reporter   ~0049354

Maybe it has some relation with id 0019529

Max Vlasov

2011-06-24 06:53

reporter   ~0049355

Christian, looks like they're related. Maybe your report was not enough to decide whether this was mac-specific or cross-platform problem

Jesus Reyes

2011-06-24 23:09

developer   ~0049370

All, Please test

Max Vlasov

2011-06-25 21:11

reporter   ~0049409

I tested both \examples\database\dblookup\project1.lpi and my project, on windows and linux, everything works fine, good job :)
I forgot to mention that my project triggered TDataset.Sync call that somehow led to the same result, but now this problem has gone

Max Vlasov

2011-06-27 11:05

reporter   ~0049446

I faced regression bugs with the current fix for 19615 The Lazarus 31414M.

The simplest test is for the same \examples\database\dblookup\project1.lpi double click in the grid and try to add a field, The linux Lazarus shows blank dialog without messages or buttons, closing this dialog closes Lazarus.

Another project has a tab with a grid (with already added field), when I try to switch to that tab in run-time, I get invalid list index error inside TCustomGrid.GetSBRanges at the line
VsbPos := integer(PtrUInt(AccumHeight[FTopLeft.y]))
and debugger says AccumHeight.fList.Count = 1, and FTopLeft.y = 1

Jesus Reyes

2011-06-27 19:51

developer   ~0049457

Please test with r31420 or later

Max Vlasov

2011-06-27 22:21

reporter   ~0049463

Quick tests show that no problems here, but I will dedicate some time tomorrow for more testing

Max Vlasov

2011-07-03 14:09

reporter   ~0049605

No problems so far

Issue History

Date Modified Username Field Change
2011-06-22 19:42 Max Vlasov New Issue
2011-06-22 19:42 Max Vlasov Widgetset => GTK 2, Win32/Win64
2011-06-22 22:58 Jesus Reyes Status new => assigned
2011-06-22 22:58 Jesus Reyes Assigned To => Jesus Reyes
2011-06-23 19:22 Jesus Reyes LazTarget => -
2011-06-23 19:22 Jesus Reyes Note Added: 0049339
2011-06-23 19:22 Jesus Reyes Status assigned => feedback
2011-06-23 21:02 Max Vlasov Note Added: 0049342
2011-06-23 21:34 Jesus Reyes Note Added: 0049343
2011-06-23 21:36 Jesus Reyes LazTarget - => 0.99.0
2011-06-23 21:36 Jesus Reyes Note Added: 0049344
2011-06-23 21:36 Jesus Reyes Severity minor => block
2011-06-23 21:36 Jesus Reyes Target Version => 0.99.0
2011-06-23 21:47 Max Vlasov Note Added: 0049345
2011-06-24 03:59 Christian Ortiz Note Added: 0049354
2011-06-24 06:53 Max Vlasov Note Added: 0049355
2011-06-24 23:09 Jesus Reyes Fixed in Revision => 31369
2011-06-24 23:09 Jesus Reyes Status feedback => resolved
2011-06-24 23:09 Jesus Reyes Fixed in Version => 0.9.31 (SVN)
2011-06-24 23:09 Jesus Reyes Resolution open => fixed
2011-06-24 23:09 Jesus Reyes Note Added: 0049370
2011-06-25 21:11 Max Vlasov Note Added: 0049409
2011-06-27 11:05 Max Vlasov Status resolved => assigned
2011-06-27 11:05 Max Vlasov Resolution fixed => reopened
2011-06-27 11:05 Max Vlasov Note Added: 0049446
2011-06-27 19:51 Jesus Reyes Fixed in Revision 31369 => 31369,31420
2011-06-27 19:51 Jesus Reyes Status assigned => resolved
2011-06-27 19:51 Jesus Reyes Resolution reopened => fixed
2011-06-27 19:51 Jesus Reyes Note Added: 0049457
2011-06-27 22:21 Max Vlasov Note Added: 0049463
2011-07-03 14:09 Max Vlasov Status resolved => closed
2011-07-03 14:09 Max Vlasov Note Added: 0049605