From 90aeaab90050a0f964db567635507bc7fd361db3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 9 May 2011 16:05:39 +0200 Subject: Fix an exception git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@185 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/StonePainter.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/jrummikub/view') diff --git a/src/jrummikub/view/impl/StonePainter.java b/src/jrummikub/view/impl/StonePainter.java index dccb01d..d6acd09 100644 --- a/src/jrummikub/view/impl/StonePainter.java +++ b/src/jrummikub/view/impl/StonePainter.java @@ -94,14 +94,12 @@ class StonePainter { */ public void setScale(float scale) { this.scale = scale; - prepaint(); - } - /** - * @return the current grid scale - */ - public float getScale() { - return scale; + if (this.scale == 0) { + this.scale = 1; + } + + prepaint(); } /** -- cgit v1.2.3