From 18a60f08fa27e56cafdbe7041d7207ab43a0bc5f Mon Sep 17 00:00:00 2001 From: Rebecca Breu Date: Sun, 11 Jul 2021 22:02:56 +0200 Subject: [PATCH] Fix double-click-to-zoom issue with previous position Douple click to zoom an item and double-clicking again should now always correctly go back to the previous position. --- CHANGELOG.rst | 11 +++++++++++ beeref/view.py | 2 ++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index abf63c0..5526f23 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,14 @@ +0.1.1 - (unreleased) +==================== + +Fixed +----- + +* Douple click to zoom an item and double-clicking again should now always + correctly go back to the previous position + + + 0.1.0 - 2021-07-10 ================== diff --git a/beeref/view.py b/beeref/view.py index 99d7ff7..91f4bd4 100644 --- a/beeref/view.py +++ b/beeref/view.py @@ -468,6 +468,8 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin): width higher on top and bottom. This gives the impression of an infinite canvas.""" + if self.previous_transform: + return logger.debug('Recalculating scene rectangle...') try: topleft = self.mapFromScene(