Browse Source

Fix box position after movement in scaled state

When box is moved in scaled state, coordinates get random fraction,
which breaks border-to-pixel alignment.
tags/v1.9.9
Nikita Zlobin Filipe Coelho <falktx@falktx.com> 7 years ago
parent
commit
2ec917cdaa
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      source/patchcanvas.py

+ 2
- 0
source/patchcanvas.py View File

@@ -2782,6 +2782,8 @@ class CanvasBox(QGraphicsItem):
def mouseReleaseEvent(self, event):
if self.m_cursor_moving:
self.setCursor(QCursor(Qt.ArrowCursor))
self.setX(round(self.x()))
self.setY(round(self.y()))
self.m_mouse_down = False
self.m_cursor_moving = False
QGraphicsItem.mouseReleaseEvent(self, event)


Loading…
Cancel
Save