From 73b8d60b8d895b23b79fe5de4cf1fc93a14c1330 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 10 May 2013 00:35:39 +0000 Subject: catch situation where overflow is < 0 --- diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index 09d4d52..976d79a 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -815,6 +815,8 @@ class TurtleArtActivity(activity.Activity): if len(palette_names) > max_palettes: max_palettes -= 1 # Make room for the palette button overflow = len(palette_names) - max_palettes + if overflow < 0: + overflow = 1 # Force overflow to be positive if gtk.gdk.screen_width() - style.GRID_CELL_SIZE < \ int(overflow * (style.GRID_CELL_SIZE + 2)): width = gtk.gdk.screen_width() - style.GRID_CELL_SIZE -- cgit v0.9.1