[shotwell/shotwell-0.18: 3/4] Nested tag can cause crash when changing selection: Bug #730336
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.18: 3/4] Nested tag can cause crash when changing selection: Bug #730336
- Date: Mon, 30 Jun 2014 21:59:08 +0000 (UTC)
commit 880cf87a06c13692cdcd9c9e354acef718d639e5
Author: Daniel Landau <daniel landau iki fi>
Date: Tue Jun 10 13:12:59 2014 -0700
Nested tag can cause crash when changing selection: Bug #730336
src/sidebar/Tree.vala | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/sidebar/Tree.vala b/src/sidebar/Tree.vala
index ab98996..37da7e0 100644
--- a/src/sidebar/Tree.vala
+++ b/src/sidebar/Tree.vala
@@ -79,7 +79,6 @@ public class Sidebar.Tree : Gtk.TreeView {
private Gtk.Menu? default_context_menu = null;
private bool is_internal_drag_in_progress = false;
private Sidebar.Entry? internal_drag_source_entry = null;
- private Gtk.TreeRowReference? old_path_ref = null;
public signal void entry_selected(Sidebar.SelectableEntry selectable);
@@ -904,8 +903,9 @@ public class Sidebar.Tree : Gtk.TreeView {
}
} else if (event.button == 1 && event.type == Gdk.EventType.BUTTON_PRESS) {
// Is this a click on an already-highlighted tree item?
- if ((old_path_ref != null) && (old_path_ref.get_path() != null)
- && (old_path_ref.get_path().compare(path) == 0)) {
+ Gtk.TreePath? cursor_path = null;
+ get_cursor(out cursor_path, null);
+ if ((cursor_path != null) && (cursor_path.compare(path) == 0)) {
// yes, don't allow single-click editing, but
// pass the event on for dragging.
text_renderer.editable = false;
@@ -917,9 +917,6 @@ public class Sidebar.Tree : Gtk.TreeView {
if (path != null && get_wrapper_at_path(path).entry is Sidebar.RenameableEntry) {
text_renderer.editable = true;
}
-
- // Remember what tree item is highlighted for next time.
- old_path_ref = (path != null) ? new Gtk.TreeRowReference(store, path) : null;
}
return base.button_press_event(event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]