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

Bug 328665

Summary: [Tree] Breaks if columns with icons are too narrow
Product: [RT] RAP Reporter: Austin Riddle <austin.riddle>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P2 CC: rsternberg, tbuschto
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch that fixes the problem none

Description Austin Riddle CLA 2010-10-25 18:44:13 EDT
Version : CVS HEAD

Resizing tree columns that have icons (other than the first column) throws a client side exception about setting the bounds to a negative value. The result is a broken client side widget.  The same can occur if a column is set to a width of 0.

The reason this happens is because the code is not taking into account margin space.

The attached patch prevents the exception from being thrown by better calculating the text width and image width (taking into account margin space).
Comment 1 Austin Riddle CLA 2010-10-25 18:45:32 EDT
Created attachment 181685 [details]
Patch that fixes the problem
Comment 2 Ivan Furnadjiev CLA 2010-11-05 07:42:50 EDT
Austin, I think that this bug is a dup of bug 327357. I can't reproduce it with the current CVS HEAD. Could you check it too?
Comment 3 Austin Riddle CLA 2010-11-05 10:52:20 EDT
(In reply to comment #2)
> Austin, I think that this bug is a dup of bug 327357. I can't reproduce it with
> the current CVS HEAD. Could you check it too?

Hi Ivan,

Somehow I missed bug 327357. I tested from CVS HEAD without my patch and all seems to be well.  It is funny that my patch was client-side and Tim's patch was server-side and they both fixed the same problem. 

Thanks.

*** This bug has been marked as a duplicate of bug 327357 ***