From 689bfb96e8fa2a0fa26816059714f5eb2443699a Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 06 Feb 2010 16:26:07 +0000 Subject: labeled coordinates --- (limited to 'turtleart.py') diff --git a/turtleart.py b/turtleart.py index da1be5c..1dee069 100755 --- a/turtleart.py +++ b/turtleart.py @@ -220,10 +220,17 @@ class TurtleMain(): def _do_cartesian_cb(self, button): if self.tw.cartesian is True: - self.tw.overlay_shapes['Cartesian'].hide() + if self.tw.coord_scale == 1: + self.tw.overlay_shapes['Cartesian_labeled'].hide() + else: + self.tw.overlay_shapes['Cartesian'].hide() self.tw.cartesian = False else: - self.tw.overlay_shapes['Cartesian'].set_layer(OVERLAY_LAYER) + if self.tw.coord_scale == 1: + self.tw.overlay_shapes['Cartesian_labeled'].set_layer( + OVERLAY_LAYER) + else: + self.tw.overlay_shapes['Cartesian'].set_layer(OVERLAY_LAYER) self.tw.cartesian = True def _do_polar_cb(self, button): @@ -234,6 +241,21 @@ class TurtleMain(): self.tw.overlay_shapes['polar'].set_layer(OVERLAY_LAYER) self.tw.polar = True + def _do_rescale_cb(self, button): + if self.tw.coord_scale == 1: + self.tw.coord_scale = self.tw.height/200 + self.tw.eraser_button() + if self.tw.cartesian is True: + self.tw.overlay_shapes['Cartesian_labeled'].hide() + self.tw.overlay_shapes['Cartesian'].set_layer(OVERLAY_LAYER) + else: + self.tw.coord_scale = 1 + self.tw.eraser_button() + if self.tw.cartesian is True: + self.tw.overlay_shapes['Cartesian'].hide() + self.tw.overlay_shapes['Cartesian_labeled'].set_layer( + OVERLAY_LAYER) + def _do_palette_cb(self, widget): self.tw.show_palette(self.i) self.i += 1 @@ -283,14 +305,6 @@ class TurtleMain(): if text is not None: self.tw.process_data(data_from_string(text)) - def _do_rescale_cb(self, button): - if self.tw.coord_scale == 1: - self.tw.coord_scale = self.tw.height/200 - self.tw.eraser_button() - else: - self.tw.coord_scale = 1 - self.tw.eraser_button() - def main(): gtk.main() return 0 -- cgit v0.9.1