summaryrefslogtreecommitdiff
path: root/editor/editor_path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_path.cpp')
-rw-r--r--editor/editor_path.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 12510e27de..e4a939c379 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -74,7 +74,12 @@ void EditorPath::_about_to_show() {
objects.clear();
get_popup()->clear();
get_popup()->set_size(Size2(get_size().width, 1));
+
_add_children_to_popup(obj);
+ if (get_popup()->get_item_count() == 0) {
+ get_popup()->add_item(TTR("No sub-resources found."));
+ get_popup()->set_item_disabled(0, true);
+ }
}
void EditorPath::update_path() {
@@ -127,6 +132,15 @@ void EditorPath::_id_pressed(int p_idx) {
EditorNode::get_singleton()->push_item(obj);
}
+void EditorPath::_notification(int p_what) {
+
+ switch (p_what) {
+ case NOTIFICATION_THEME_CHANGED: {
+ update_path();
+ } break;
+ }
+}
+
void EditorPath::_bind_methods() {
ClassDB::bind_method("_about_to_show", &EditorPath::_about_to_show);