Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312934 - redraw turned off to soon when selecting features
Summary: redraw turned off to soon when selecting features
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 RC2   Edit
Assignee: Ankur Sharma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 12:05 EDT by Darin Wright CLA
Modified: 2010-05-21 11:27 EDT (History)
1 user (show)

See Also:
darin.eclipse: review+
ankur_sharma: review+


Attachments
screen shot (23.31 KB, image/png)
2010-05-14 12:06 EDT, Darin Wright CLA
no flags Details
Patch (6.82 KB, patch)
2010-05-18 05:21 EDT, Ankur Sharma CLA
no flags Details | Diff
Simpler Patch (1.56 KB, patch)
2010-05-18 15:57 EDT, Curtis Windatt CLA
no flags Details | Diff
Updated Patch (5.69 KB, patch)
2010-05-18 18:11 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2010-05-14 12:05:02 EDT
I20100513-1500

* In the LCD, plug-ins tab, feature launch mode
* Deselect all, check "only show selected"
* Press "select features..."
* drag the feature selection dialog around and notice that the tree no longer paints behind the dialog.

Looks like redraw is being turned off before the dialog is opened, but it should only be toggled off/on when the actual updates are performed (after the dialog selection is complete - and not required if cancel is pressed).
Comment 1 Darin Wright CLA 2010-05-14 12:06:21 EDT
Created attachment 168558 [details]
screen shot

Notice the trail as one drags the dialog around over the tree.
Comment 2 Ankur Sharma CLA 2010-05-18 05:21:24 EDT
Created attachment 168879 [details]
Patch
Comment 3 Darin Wright CLA 2010-05-18 09:55:32 EDT
+1
Comment 4 Ankur Sharma CLA 2010-05-18 15:01:47 EDT
I will need one more +1. Curtis, plz review
Comment 5 Curtis Windatt CLA 2010-05-18 15:57:10 EDT
Created attachment 169007 [details]
Simpler Patch

Solves the reported problem by moving the setredraw calls.
Comment 6 Curtis Windatt CLA 2010-05-18 15:59:21 EDT
Ankur, was your patch trying to accomplish more than fixing the redraw problem?  There are a lot of changes in your patch that I didn't understand.  I feel much better putting in a small change to fix the problem over a larger patch that could affect the behaviour of other buttons in the tab.
Comment 7 Ankur Sharma CLA 2010-05-18 16:24:53 EDT
The simpler patch doesn't solves all the problems.

1. It works only for Select Feature dialog. The validate and Add plug-ins buttons too open a dialog. They need to be handled too.
2. Also, when the show selected is checked, and then any of these dialogs is opened, we can see the tree getting unfiltered and then refiltered in background with scrollbar dancing.

The previous patch addresses these issues too. All these are redraw related problems only.
Comment 8 Curtis Windatt CLA 2010-05-18 18:11:43 EDT
Created attachment 169031 [details]
Updated Patch

This patch fixes the problems mentioned in comment #7.  We don't need to disable drawing for anything except adding new content to the tree.  I see that your original patch did this using a boolean, but it is better to have the redraw cover the smallest possible area.  If there is a mistake in the code or an exception occurs while redraw is off, the UI will look very broken.

This patch could definitely use some more testing.  I think that it is a safer solution than your original patch Ankur.
Comment 9 Ankur Sharma CLA 2010-05-19 08:04:32 EDT
+1
This one is good.
Comment 10 Darin Wright CLA 2010-05-19 14:55:45 EDT
+1. Applied/Fixed.
Comment 11 Darin Wright CLA 2010-05-21 11:27:02 EDT
Verified.