Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 407561

Summary: [Tree] GridRow height incorrect on first session
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: tbuschto
Version: unspecified   
Target Milestone: 2.1 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2013-05-08 12:54:02 EDT
In the first session of an RAP application instance for a specific browser the height of the rows of a freshly created table is incorrect, leading to cell labels beeing seemingly aligned to the bottom of the row. Easily reproducable with the controls demo.
Comment 1 Ivan Furnadjiev CLA 2013-05-08 13:56:34 EDT
Tim, I can't reproduce it or didn't get the steps to reproduce correctly. I started the Controls Demo directly to the Table tab (http://127.0.0.1:8080/rapdemo/controls#Table) and everything is looking fine. Enabled "linesVisible" to make sure that cell labels are well positioned.
Comment 2 Tim Buschtoens CLA 2013-05-13 07:57:05 EDT
The Table in the "Table" tab is alright, it's the navigation table one on left.
Comment 3 Tim Buschtoens CLA 2013-05-13 08:12:16 EDT
Actually that's a Tree. I think the problematic lines are these in Tree.java#getItemHeight:

      if( !layoutCache.hasItemHeight() ) {
        layoutCache.itemHeight = computeItemHeight();
      }
      result = layoutCache.itemHeight;

Chaching the result TextSizeUtil.getCharHeight is problematic because it may be an estimation instead of a probe result.
Comment 4 Ivan Furnadjiev CLA 2013-05-13 10:46:51 EDT
Fixed with commit 2cd761064b168518109995eb3150e8d9019bb547.