Parcourir la source

tools: select and scroll to resource on right click

Daniele Bartolini il y a 1 an
Parent
commit
0c9ee5d21c
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      tools/level_editor/project_browser.vala

+ 3 - 0
tools/level_editor/project_browser.vala

@@ -344,6 +344,9 @@ public class ProjectIconView : Gtk.IconView
 
 
 			Gtk.TreePath path;
 			Gtk.TreePath path;
 			if ((path = this.get_path_at_pos((int)ev.x, (int)ev.y)) != null) {
 			if ((path = this.get_path_at_pos((int)ev.x, (int)ev.y)) != null) {
+				select_path(path);
+				scroll_to_path(path, false, 0.0f, 0.0f);
+
 				Gtk.TreeIter iter;
 				Gtk.TreeIter iter;
 				this.model.get_iter(out iter, path);
 				this.model.get_iter(out iter, path);