| Summary: | Rocs removes nodes from the graph object when changing their type | ||
|---|---|---|---|
| Product: | [Applications] Rocs | Reporter: | Frederik Gladhorn <gladhorn> |
| Component: | script engine | Assignee: | Andreas Cord-Landwehr <cordlandwehr> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | cordlandwehr |
| Priority: | NOR | ||
| Version First Reported In: | Git | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/rocs/579e3d9e28c603be867b57fbcc6291e964340df6 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
The problem is a missing accessor function for nodes of node type different than type 0, i.e. missing script accessor function: GraphStructure::list_nodes(DATA_TYPE) Git commit 6faf53744e89ee20ede6b952b72907cbf05baea9 by Andreas Cord-Landwehr. Committed on 07/08/2012 at 12:02. Pushed by cordlandwehr into branch 'master'. Add script accessor functions for nodes/edges of different types. Fix and extend node/edge script accessor function of Graph data structure plugin: * Fix behavior of GraphStructure::list_nodes(): return nodes of all types * Fix behavior of GraphStructure::list_edges(): return edges of all types * Add new method GraphStructure::list_nodes(int type): return only nodes of specified type * Add new method GraphStructure::list_edges(int type): return only edges of specified type M +25 -2 src/Plugins/DataStructure/Graph/GraphStructure.cpp M +18 -2 src/Plugins/DataStructure/Graph/GraphStructure.h http://commits.kde.org/rocs/6faf53744e89ee20ede6b952b72907cbf05baea9 Git commit 579e3d9e28c603be867b57fbcc6291e964340df6 by Andreas Cord-Landwehr. Committed on 07/08/2012 at 12:02. Pushed by cordlandwehr into branch 'KDE/4.9'. Add script accessor functions for nodes/edges of different types. Fix and extend node/edge script accessor function of Graph data structure plugin: * Fix behavior of GraphStructure::list_nodes(): return nodes of all types * Fix behavior of GraphStructure::list_edges(): return edges of all types * Add new method GraphStructure::list_nodes(int type): return only nodes of specified type * Add new method GraphStructure::list_edges(int type): return only edges of specified type (cherry picked from commit 6faf53744e89ee20ede6b952b72907cbf05baea9) M +25 -2 src/Plugins/DataStructure/Graph/GraphStructure.cpp M +18 -2 src/Plugins/DataStructure/Graph/GraphStructure.h http://commits.kde.org/rocs/579e3d9e28c603be867b57fbcc6291e964340df6 |
Run this script with an existing graph object g and two node types. output("Length: " + g.list_nodes().length); g.list_nodes()[0].set_type(1); output("Length: " + g.list_nodes().length); In rocs 1.6.95 I end up with one node less. I don't see an easy way to access the node again. Reproducible: Always