This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 223993 - Wrong event from Outline after expanding node
Summary: Wrong event from Outline after expanding node
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.1
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 17:15 UTC by sedlakf
Modified: 2013-01-09 11:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sedlakf 2012-12-18 17:15:41 UTC
Possibly the same case as in http://netbeans.org/bugzilla/show_bug.cgi?id=200846

Having Outline with a large model (FixedHeightLayoutCache), expanding a node fires an event with firstRow=0 and lastRow=0 of type INSERT. This then produces a call to SelectionModel.insertIndexInterval(0, 1, true) which shifts the whole selection.

My assumption about the cause follows:

EventBroadcaster.translateEvent method checks for firstRow == -1. Before, it adds one to the result. As FixedHeightLayoutCache returns -1 for collapsed nodes, it seems the condition firstRow == -1 can never be true with FixedHeightLayoutCache.