Skip to content

Commit d609088

Browse files
authored
Merge pull request #3784 from mrognor/master
Fix mouse manipulation bug
2 parents 93a9e44 + 5b7a25c commit d609088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gns3/graphics_view.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ def mouseMoveEvent(self, event):
636636
hBar = self.horizontalScrollBar()
637637
vBar = self.verticalScrollBar()
638638
delta = mapped_global_pos - self._last_mouse_position
639-
hBar.setValue(hBar.value() + (delta.x() if QtWidgets.QApplication.isRightToLeft() else -delta.x()))
640-
vBar.setValue(vBar.value() - delta.y())
639+
hBar.setValue(int(hBar.value() + (delta.x() if QtWidgets.QApplication.isRightToLeft() else - delta.x())))
640+
vBar.setValue(int(vBar.value() - delta.y()))
641641
self._last_mouse_position = mapped_global_pos
642642
if self._adding_link and self._newlink and self._newlink in self.scene().items():
643643
# update the mouse position when the user is adding a link.

0 commit comments

Comments
 (0)