From 67050ff5a8299206adb2b9f020937c6ec71e7630 Mon Sep 17 00:00:00 2001 From: "mascha@ma-scha.de" Date: Thu, 20 Mar 2008 17:04:10 +0000 Subject: [PATCH] 2008-03-20 Martin Schaaf * src/MMapArea.py o check for attribute transform on coord transformation * src/MainWindow.py o fix color update if a thought is selected that doesn't have background or foreground colors git-svn-id: https://labyrinth.googlecode.com/svn/trunk@187 8f060a39-251c-0410-b1f3-431655927647 --- ChangeLog | 7 +++++++ src/MMapArea.py | 3 ++- src/MainWindow.py | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16a8e9b..ce3ac4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-20 Martin Schaaf + + * src/MMapArea.py + o check for attribute transform on coord transformation + * src/MainWindow.py + o fix color update if a thought is selected that doesn't have background or foreground colors + 2008-03-18 Martin Schaaf * src/MMapArea.py diff --git a/src/MMapArea.py b/src/MMapArea.py index 64bb5b0..f631485 100644 --- a/src/MMapArea.py +++ b/src/MMapArea.py @@ -166,7 +166,8 @@ def __init__(self, undo): self.foreground_color = gtk.gdk.color_parse("black") def transform_coords(self, loc_x, loc_y): - return self.transform.transform_point(loc_x, loc_y) + if hasattr(self, "transform"): + return self.transform.transform_point(loc_x, loc_y) def button_down (self, widget, event): coords = self.transform_coords (event.get_coords()[0], event.get_coords()[1]) diff --git a/src/MainWindow.py b/src/MainWindow.py index 8a3c575..51c3359 100644 --- a/src/MainWindow.py +++ b/src/MainWindow.py @@ -426,8 +426,10 @@ def switch_buffer_cb (self, arg, new_buffer): self.extended.set_editable (False) def thought_selected_cb (self, arg, background_color, foreground_color): - self.background_widget.set_color(background_color) - self.foreground_widget.set_color(foreground_color) + if background_color: + self.background_widget.set_color(background_color) + if foreground_color: + self.foreground_widget.set_color(foreground_color) def main_area_focus_cb (self, arg, event, extended = False): if not extended: