Browse Source

Fix the editor path icon when switching from dark to light theme

Hugo Locurcio 5 years ago
parent
commit
91825ec1d4
2 changed files with 10 additions and 0 deletions
  1. 9 0
      editor/editor_path.cpp
  2. 1 0
      editor/editor_path.h

+ 9 - 0
editor/editor_path.cpp

@@ -132,6 +132,15 @@ void EditorPath::_id_pressed(int p_idx) {
 	EditorNode::get_singleton()->push_item(obj);
 	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() {
 void EditorPath::_bind_methods() {
 
 
 	ClassDB::bind_method("_about_to_show", &EditorPath::_about_to_show);
 	ClassDB::bind_method("_about_to_show", &EditorPath::_about_to_show);

+ 1 - 0
editor/editor_path.h

@@ -48,6 +48,7 @@ class EditorPath : public MenuButton {
 	void _add_children_to_popup(Object *p_obj, int p_depth = 0);
 	void _add_children_to_popup(Object *p_obj, int p_depth = 0);
 
 
 protected:
 protected:
+	void _notification(int p_what);
 	static void _bind_methods();
 	static void _bind_methods();
 
 
 public:
 public: