Fix Clipboard for right-click on empty clipboard (#566)

Issues #10473
This commit is contained in:
Paul Culley 2018-02-28 16:18:36 -06:00 committed by Sam Manzi
parent 41a2a46713
commit 6bf33ab899

View File

@ -1540,6 +1540,8 @@ class MultiTreeView(Gtk.TreeView):
if is_right_click(event): if is_right_click(event):
selection = widget.get_selection() selection = widget.get_selection()
store, paths = selection.get_selected_rows() store, paths = selection.get_selected_rows()
if not paths:
return
tpath = paths[0] if len(paths) > 0 else None tpath = paths[0] if len(paths) > 0 else None
node = store.get_iter(tpath) if tpath else None node = store.get_iter(tpath) if tpath else None
o = None o = None