summaryrefslogtreecommitdiff
path: root/editor/create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r--editor/create_dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 7e59fc31c4..f9858aa514 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -130,8 +130,8 @@ bool CreateDialog::_should_hide_type(const String &p_type) const {
}
if (ClassDB::class_exists(p_type)) {
- if (!ClassDB::can_instantiate(p_type)) {
- return true; // Can't create abstract class.
+ if (!ClassDB::can_instantiate(p_type) || ClassDB::is_virtual(p_type)) {
+ return true; // Can't create abstract or virtual class.
}
if (!ClassDB::is_parent_class(p_type, base_type)) {