diff options
author | matthias.vogelgesang <matthias.vogelgesang@8f060a39-251c-0410-b1f3-431655927647> | 2008-04-02 17:23:36 (GMT) |
---|---|---|
committer | matthias.vogelgesang <matthias.vogelgesang@8f060a39-251c-0410-b1f3-431655927647> | 2008-04-02 17:23:36 (GMT) |
commit | 161779f1f30dff9cb08e6a54626b56506747a8c7 (patch) | |
tree | 0037d9744876c30db7c752509458f18c2f060de0 /src/TextThought.py | |
parent | 2bc2372471228dfa69cc0913e7e123bcdf90bd40 (diff) |
* quick fix, select all when already editing
git-svn-id: http://labyrinth.googlecode.com/svn/trunk@286 8f060a39-251c-0410-b1f3-431655927647
Diffstat (limited to 'src/TextThought.py')
-rw-r--r-- | src/TextThought.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/TextThought.py b/src/TextThought.py index 551ef5e..376a5d1 100644 --- a/src/TextThought.py +++ b/src/TextThought.py @@ -749,9 +749,11 @@ class TextThought (BaseThought.BaseThought): if not (event.state & modifiers) & gtk.gdk.SHIFT_MASK: self.end_index = self.index elif mode == BaseThought.MODE_EDITING and event.type == gtk.gdk._2BUTTON_PRESS: - self.move_index_horizontal(False) # go to the end - self.index = 0 # and mark all - self.emit ("begin_editing") + if self.editing: + self.move_index_horizontal(False) # go to the end + self.index = 0 # and mark all + else: + self.emit ("begin_editing") elif event.button == 2 and self.editing: x = int ((transformed[0] - self.ul[0])*pango.SCALE) y = int ((transformed[1] - self.ul[1])*pango.SCALE) |