Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328665 - [Tree] Breaks if columns with icons are too narrow
Summary: [Tree] Breaks if columns with icons are too narrow
Status: CLOSED DUPLICATE of bug 327357
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-25 18:44 EDT by Austin Riddle CLA
Modified: 2010-11-05 10:52 EDT (History)
2 users (show)

See Also:


Attachments
Patch that fixes the problem (2.00 KB, patch)
2010-10-25 18:45 EDT, Austin Riddle CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ***