TitleEntry - clear selection

When editing stops, clear the selection.
This commit is contained in:
James Cameron 2018-01-15 16:34:19 +11:00
parent 1cf9ba8190
commit 5876bc4a00

View File

@ -187,6 +187,7 @@ class TitleEntry(Gtk.ToolItem):
def __activate_cb(self, entry, activity): def __activate_cb(self, entry, activity):
self.save_title(activity) self.save_title(activity)
entry.select_region(0, 0)
entry.hide() entry.hide()
entry.show() entry.show()
return False return False
@ -207,6 +208,7 @@ class TitleEntry(Gtk.ToolItem):
return False return False
def __focus_out_event_cb(self, widget, event, activity): def __focus_out_event_cb(self, widget, event, activity):
widget.select_region(0, 0)
self.save_title(activity) self.save_title(activity)
return False return False