From e547c780c933031e01fe4e17cef9478cb17bc3a2 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Sun, 4 Dec 2011 13:01:14 +0000 Subject: [PATCH] DroidFish: Don't process scroll events if chess board square size is zero. --- DroidFish/src/org/petero/droidfish/DroidFish.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DroidFish/src/org/petero/droidfish/DroidFish.java b/DroidFish/src/org/petero/droidfish/DroidFish.java index c6b9af0..48d6faf 100644 --- a/DroidFish/src/org/petero/droidfish/DroidFish.java +++ b/DroidFish/src/org/petero/droidfish/DroidFish.java @@ -89,7 +89,6 @@ import android.view.View.OnClickListener; import android.view.View.OnKeyListener; import android.view.View.OnLongClickListener; import android.view.View.OnTouchListener; -import android.widget.Button; import android.widget.EditText; import android.widget.ImageButton; import android.widget.LinearLayout; @@ -325,7 +324,7 @@ public class DroidFish extends Activity implements GUIInterface { distanceX = -distanceX; distanceY = -distanceY; } - if (scrollSensitivity > 0) { + if ((scrollSensitivity > 0) && (cb.sqSize > 0)) { scrollX += distanceX; scrollY += distanceY; float scrollUnit = cb.sqSize * scrollSensitivity;