summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2024-05-28 18:57:04 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2024-05-28 18:57:04 +0800
commit8a17acf35c88866d5a9c060c8f4553618060f2f8 (patch)
tree55c811679e19d0f73ccb9e94c885a2705204e2e5 /editor
parentbe56cab58c056c074d1e02cd0b38641204e39f41 (diff)
downloadredot-engine-8a17acf35c88866d5a9c060c8f4553618060f2f8.tar.gz
Fix error when dropping image onto the scene dock
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_dock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index f90fa7603f..9209c26876 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -3333,9 +3333,9 @@ void SceneTreeDock::_files_dropped(const Vector<String> &p_files, NodePath p_to,
// Either instantiate scenes or create AudioStreamPlayers.
int to_pos = -1;
_normalize_drop(node, to_pos, p_type);
- if (res_type == "PackedScene") {
+ if (ClassDB::is_parent_class(res_type, "PackedScene")) {
_perform_instantiate_scenes(p_files, node, to_pos);
- } else {
+ } else if (ClassDB::is_parent_class(res_type, "AudioStream")) {
_perform_create_audio_stream_players(p_files, node, to_pos);
}
}