Explorar o código

tools: reset search entry text when the chooser gets hidden

Daniele Bartolini %!s(int64=5) %!d(string=hai) anos
pai
achega
20fa85d84f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      tools/level_editor/resource_chooser.vala

+ 6 - 0
tools/level_editor/resource_chooser.vala

@@ -132,6 +132,7 @@ public class ResourceChooser : Gtk.Box
 		_editor_slide.show_widget(label);
 		_editor_slide.show_widget(label);
 
 
 		this.destroy.connect(on_destroy);
 		this.destroy.connect(on_destroy);
+		this.unmap.connect(on_unmap);
 
 
 		restart_editor();
 		restart_editor();
 	}
 	}
@@ -187,6 +188,11 @@ public class ResourceChooser : Gtk.Box
 		stop_editor();
 		stop_editor();
 	}
 	}
 
 
+	private void on_unmap()
+	{
+		_filter_entry.text = "";
+	}
+
 	private void start_editor(uint window_xid)
 	private void start_editor(uint window_xid)
 	{
 	{
 		if (window_xid == 0)
 		if (window_xid == 0)