Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-07-27 16:43:18 -0400
committerspingel2010-07-27 16:43:18 -0400
commit90bde6d3d073342c99f32b79fad67ce43e060ea5 (patch)
treeafec37c46074640ea87ea5aa605bd8ce244fc58a
parentd17a5a00cb05990a675cb10ca1f6475b7d465ee1 (diff)
downloadorg.eclipse.mylyn.tasks-90bde6d3d073342c99f32b79fad67ce43e060ea5.tar.gz
org.eclipse.mylyn.tasks-90bde6d3d073342c99f32b79fad67ce43e060ea5.tar.xz
org.eclipse.mylyn.tasks-90bde6d3d073342c99f32b79fad67ce43e060ea5.zip
NEW - bug 319624: when focus is enabled or disabled in the tasklist, the toolbar seems to jump
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319624
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java33
1 files changed, 25 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 7c8887ecb..b956ad3a0 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -1527,16 +1527,33 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I
this.focusedMode = focusedMode;
customDrawer.setFocusedMode(focusedMode);
IToolBarManager manager = getViewSite().getActionBars().getToolBarManager();
+ ToolBarManager toolBarManager = getToolBarManager(manager);
+ try {
+ if (toolBarManager != null) {
+ toolBarManager.getControl().setRedraw(false);
+ }
+ if (focusedMode && isAutoExpandMode()) {
+ manager.remove(FilterCompletedTasksAction.ID);
+ manager.remove(CollapseAllAction.ID);
+ } else if (manager.find(CollapseAllAction.ID) == null) {
+ manager.prependToGroup(ID_SEPARATOR_CONTEXT, collapseAll);
+ manager.prependToGroup(ID_SEPARATOR_CONTEXT, filterCompleteTask);
+ }
+ updateFilterEnablement();
+ manager.update(false);
+ } finally {
+ if (toolBarManager != null) {
+ toolBarManager.getControl().setRedraw(true);
+ }
+ }
+ }
- if (focusedMode && isAutoExpandMode()) {
- manager.remove(FilterCompletedTasksAction.ID);
- manager.remove(CollapseAllAction.ID);
- } else if (manager.find(CollapseAllAction.ID) == null) {
- manager.prependToGroup(ID_SEPARATOR_CONTEXT, collapseAll);
- manager.prependToGroup(ID_SEPARATOR_CONTEXT, filterCompleteTask);
+ private ToolBarManager getToolBarManager(IToolBarManager manager) {
+ if (manager instanceof ToolBarManager && ((ToolBarManager) manager).getControl() != null
+ && !((ToolBarManager) manager).getControl().isDisposed()) {
+ return (ToolBarManager) manager;
}
- manager.update(false);
- updateFilterEnablement();
+ return null;
}
public void displayPrioritiesAbove(String priority) {

Back to the top