Bug 22448 - CoolBar - deleting first item in row does unnecessary collapse/expand of row
Summary: CoolBar - deleting first item in row does unnecessary collapse/expand of row
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-14 15:51 EDT by Lynne Kues CLA
Modified: 2002-08-15 14:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lynne Kues CLA 2002-08-14 15:51:24 EDT
Build 20020814 2.0.1

1. Open a New Resource Perspective.
2. Customize the perspective so that the External Tools coolItem and Search 
coolItem are the only cool items on the row (along with the default UI 
coolItem). 
3. Move the Search coolItem and External Tools coolItem to their own row, so 
that the coolbar looks like this:

    UI
    Srch  ExtTools

4. Customize the perspective and uncheck Search and check CVS, which will 
remove Srch from row 2 and add the CVS coolItem to the end of row 2.

You will see noticeable flash/jumpiness as the coolbar is collapsed to 1 row 
and then re-expanded to 2 rows when the delete takes place - even though this 
action is not necessary since ExtTools still exists on the row.

If you decide to use setRedraw(false) around the code that is causing this, can 
you please look into [Bug 17994].  setRedraw is still noticeably flashy due to 
this PR (i.e., you see all the grippers on the coolbar flash).  Other than 
that, the painting is smooth (i.e., you don't see tool items flashing just the 
grippers).

This NEEDS to be fixed for 2.0.1.  It leads to way too much jumpiness on the 
coolbar (i.e., whenever the first item in a row is removed) and is much more 
apparent now that coolitem positions are being remembered.  For example, if you 
have the *.java editor coolitem as the first item on a row and switch back and 
forth between a *.java file and a *.class file, you will see major 
flash/jumpiness.
Comment 1 Lynne Kues CLA 2002-08-14 16:24:05 EDT
Released temporary workaround for the 20020815 2.0.1 build (want to wsad to see 
the coolbar remember position behavior without this bug).  Also released the 
same change into the 2.1 dev stream.  You'll be able to reproduce the behavior 
I describe above in builds <= 20020814.  Still want a fix for this on your end.
Comment 2 Felipe Heidrich CLA 2002-08-15 11:00:21 EDT
the fix for this bug is not related with using setRedraw.

During the destroyItem the following step are perform:
(assuming that: the coobar has R rows, deleting the item at index I)
a) Detect if the item is a wrap
b) Delete the item, if the item was a wrap it will cause WM_SIZE, what causes 
the workbench to layout for R - 1 rows.
c) If the item was wrap AND now there is a new item in index 'I' make the new 
item be a wrap, what causes the workbench to layout back to R rows.

The fix is stop the WM_SIZE, but this have to be done very carefully.
I will study more this case and try to submit the fix as soom as I can.

Comment 3 Steve Northover CLA 2002-08-15 14:29:32 EDT
Fixed > 20020815 and R2.0.1