summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-24 11:05:20 +0200
committerGitHub <noreply@github.com>2019-09-24 11:05:20 +0200
commit4a7889578ccf3423d07ccf2c9546dabcdb837514 (patch)
treef85f09b217a99faacccf9f21ade37bd99da49e43 /editor
parenta7b95d1934f1379f302cd0c3c90a0b7f8f825773 (diff)
parente5f96a344ac5234c7a8116e5b8ac9feb67b02e22 (diff)
Merge pull request #31978 from YeldhamDev/inspector_dock_small_improvements
Small improvements to the inspector dock
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_path.cpp5
-rw-r--r--editor/inspector_dock.cpp6
2 files changed, 7 insertions, 4 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 12510e27de..f487a3048b 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() {
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index e4411e436a..02b0159241 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -253,13 +253,11 @@ void InspectorDock::_prepare_history() {
text = obj->get_class();
}
- if (i == editor_history->get_history_pos()) {
+ if (i == editor_history->get_history_pos() && current) {
text = "[" + text + "]";
}
history_menu->get_popup()->add_icon_item(icon, text, i);
}
-
- editor_path->update_path();
}
void InspectorDock::_select_history(int p_idx) const {
@@ -296,7 +294,7 @@ void InspectorDock::_edit_forward() {
}
void InspectorDock::_edit_back() {
EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
- if (editor_history->previous() || editor_history->get_path_size() == 1)
+ if ((current && editor_history->previous()) || editor_history->get_path_size() == 1)
editor->edit_current();
}