changeset 73:88305fa62d7e

TileGrid: new zoomOriginal method Pretty trivial, will wire it up like the other zoom methods in a forthcoming commit.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 10 Sep 2019 12:48:02 -0400
parents 74ebf2f4e801
children 66773b576282
files tilerswift
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tilerswift
+++ b/tilerswift
@@ -146,6 +146,8 @@
 
 class TileGrid(QW.QWidget):
 
+    DEFAULT_SCALE_FACTOR = 5
+
     def __init__(self, numrows, numcols, scalefactor, spacing):
         super().__init__()
 
@@ -220,6 +222,11 @@
 
         self.resize()
 
+    def zoomOriginal(self):
+        self.scalefactor = self.DEFAULT_SCALE_FACTOR
+
+        self.resize()
+
     def computeNumRows(self):
         pass