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]);
}
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.02358 seconds