Merge pull request #69 from tomhughes/clipboard
Re-enable selection in the clipboard on a grab_broken event
This commit is contained in:
commit
19ab02a4f9
@ -1477,6 +1477,7 @@ class MultiTreeView(Gtk.TreeView):
|
||||
Gtk.TreeView.__init__(self)
|
||||
self.connect('button_press_event', self.on_button_press)
|
||||
self.connect('button_release_event', self.on_button_release)
|
||||
self.connect('grab_broken_event', self.on_grab_broken)
|
||||
self.connect('key_press_event', self.key_press_event)
|
||||
self.defer_select = False
|
||||
|
||||
@ -1578,6 +1579,11 @@ class MultiTreeView(Gtk.TreeView):
|
||||
|
||||
self.defer_select=False
|
||||
|
||||
def on_grab_broken(self, widget, event):
|
||||
# re-enable selection
|
||||
self.get_selection().set_select_function(lambda *ignore: True, None)
|
||||
self.defer_select=False
|
||||
|
||||
def edit_obj(self, objclass, handle):
|
||||
from .editors import (EditPerson, EditEvent, EditFamily, EditSource,
|
||||
EditPlace, EditRepository, EditNote, EditMedia,
|
||||
|
@ -40,6 +40,7 @@ class MultiTreeView(Gtk.TreeView):
|
||||
Gtk.TreeView.__init__(self)
|
||||
self.connect('button_press_event', self.on_button_press)
|
||||
self.connect('button_release_event', self.on_button_release)
|
||||
self.connect('grab_broken_event', self.on_grab_broken)
|
||||
self.connect('key_press_event', self.key_press_event)
|
||||
self.defer_select = False
|
||||
|
||||
@ -82,3 +83,7 @@ class MultiTreeView(Gtk.TreeView):
|
||||
|
||||
self.defer_select=False
|
||||
|
||||
def on_grab_broken(self, widget, event):
|
||||
# re-enable selection
|
||||
self.get_selection().set_select_function(lambda *ignore: True, None)
|
||||
self.defer_select=False
|
||||
|
Loading…
Reference in New Issue
Block a user