Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zest: Bug in Graph setSelection() ?
Zest: Bug in Graph setSelection() ? [message #485908] Tue, 15 September 2009 14:07
Eclipse User
Originally posted by: eclipse.cs-dev.de

Hallo,

I've searched a while to fix a bug in my application. I missed a
selectionChanged() Event, after changing the selection programmatic via
the GraphViewer. After a little change all runs fine.

I only add fireWidgetSelectedEvent(nodes[i]);

Here my patch:

### Eclipse Workspace Patch 1.0
#P org.eclipse.zest.core
Index: src/org/eclipse/zest/core/widgets/Graph.java
============================================================ =======
RCS file:
/cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.zest.core /src/org/eclipse/zest/core/widgets/Graph.java,v
retrieving revision 1.41
diff -u -r1.41 Graph.java
--- src/org/eclipse/zest/core/widgets/Graph.java 30 Jan 2009 01:14:33
-0000 1.41
+++ src/org/eclipse/zest/core/widgets/Graph.java 15 Sep 2009 14:07:19 -0000
@@ -313,7 +313,8 @@

/**
* Changes the selection to the list of items
- *
+ * FIXED 08.09.2009 fireWidgetSelectedEvent() hinzugefügt, damit bei
setSelection
+ * auch ein SelectionChangedEvent ausgelöst wird!
* @param l
*/
public void setSelection(GraphItem[] nodes) {
@@ -323,6 +324,7 @@
if (nodes[i] != null && nodes[i] instanceof GraphItem) {
selectedItems.add(nodes[i]);
(nodes[i]).highlight();
+ fireWidgetSelectedEvent(nodes[i]);
}
}
}
Previous Topic:Zest: Patch for method fishEye and wrong container size
Next Topic:Dispatching Event from Figure to EditPart
Goto Forum:
  


Current Time: Sat Oct 25 16:58:09 GMT 2014

Powered by FUDForum. Page generated in 0.01572 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software