Bladeren bron

tools: reject dropped items when showing favorites

Backport of: 63490068b
Daniele Bartolini 3 maanden geleden
bovenliggende
commit
614409c41a
2 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 1 0
      docs/changelog.rst
  2. 5 0
      tools/level_editor/project_browser.vala

+ 1 - 0
docs/changelog.rst

@@ -14,6 +14,7 @@ Changelog
 **Fixes**
 
 * Tools: fixed creation of animation state machine resources.
+* Tools: the Project Browser will now reject dropped files while showing Favorites.
 * Runtime: Windows: fixed a number of misdetected keyboard keys.
 * Runtime: Linux: fixed a crash at startup due to some X11 libraries not being found.
 * Lua: fixed a memory leak when executing some script component callbacks.

+ 5 - 0
tools/level_editor/project_browser.vala

@@ -399,6 +399,11 @@ public class ProjectFolderView : Gtk.Box
 
 	private void on_drag_data_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_)
 	{
+		if (!_showing_project_folder) {
+			Gtk.drag_finish(context, true, false, time_);
+			return;
+		}
+
 		Gtk.TreePath? path = path_at_pos(x, y);
 
 		if (path != null) {