Browse Source

tools: reset search entry text when the chooser gets hidden

Daniele Bartolini 5 years ago
parent
commit
20fa85d84f
1 changed files with 6 additions and 0 deletions
  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);
 
 		this.destroy.connect(on_destroy);
+		this.unmap.connect(on_unmap);
 
 		restart_editor();
 	}
@@ -187,6 +188,11 @@ public class ResourceChooser : Gtk.Box
 		stop_editor();
 	}
 
+	private void on_unmap()
+	{
+		_filter_entry.text = "";
+	}
+
 	private void start_editor(uint window_xid)
 	{
 		if (window_xid == 0)