Skip to content

Commit

Permalink
fixed artefacts in graphview drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed Dec 24, 2023
1 parent 122c398 commit f996843
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zxlive/graphview.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def __init__(self, graph_scene: GraphScene) -> None:
# self.setResizeAnchor(QGraphicsView.ViewportAnchor.AnchorViewCenter)
self.setResizeAnchor(QGraphicsView.ViewportAnchor.AnchorUnderMouse)
#self.setDragMode(QGraphicsView.DragMode.ScrollHandDrag) # This has to be enabled based on keyboard shortcuts
self.setCacheMode(QGraphicsView.CacheModeFlag.CacheBackground);
self.setViewportUpdateMode(QGraphicsView.ViewportUpdateMode.BoundingRectViewportUpdate);

# We implement the rubberband logic ourselves. Note that there is also
# the option to set `self.setDragMode(QGraphicsView.RubberBandDrag)`,
Expand Down
1 change: 1 addition & 0 deletions zxlive/vitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def refresh(self) -> None:
brush.setStyle(Qt.BrushStyle.Dense1Pattern)
self.setBrush(brush)
pen.setColor(colors.boundary_pressed)
self.prepareGeometryChange()
self.setPen(pen)

if self.phase_item:
Expand Down

0 comments on commit f996843

Please sign in to comment.