Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt_dotgraph: Allow custom edge style #51

Merged
merged 1 commit into from
Feb 2, 2015
Merged

qt_dotgraph: Allow custom edge style #51

merged 1 commit into from
Feb 2, 2015

Conversation

galou
Copy link

@galou galou commented Jan 27, 2015

Allow 'dashed' and 'dotted' edge styles.

@@ -180,6 +180,7 @@ def addEdgeItem(self, edge, nodes, edges, highlight_level, same_label_siblings=F
if 'style' in edge.attr:
if edge.attr['style'] == 'invis':
return
style = edge.attr.get('style', 'solid')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since yoo choose the default also in the EdgeItem this line should not define a default but None instead.

@galou
Copy link
Author

galou commented Jan 28, 2015

Did all suggested changes. Thanks for reviewing!

self._text_brush = QBrush(self._default_color)
self._shape_brush = QBrush(self._default_color)
if style in ['dashed', 'dotted']:
self._shape_brush = QBrush(Qt.transparent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the shape need to be transparent in these cases?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, the triangular shape at the end of the arrow has a dashed border but a black fill. What looks strange.

@dirk-thomas
Copy link
Contributor

Thanks!

dirk-thomas added a commit that referenced this pull request Feb 2, 2015
qt_dotgraph: Allow custom edge style
@dirk-thomas dirk-thomas merged commit efc7692 into ros-visualization:groovy-devel Feb 2, 2015
@galou galou deleted the custom_edge_style branch February 2, 2015 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants