Update the window title when the project settings were changed or when the unsaved cache was changed (either by editing something or by saving)
This makes sure that: 1.) The title is always up-to-date with project settings 2.) The title always reflects the changes made in the editor by showing or hiding the '(*)'
This commit is contained in:
parent
e9ca15b6a6
commit
3b20b9d32a
1 changed files with 9 additions and 3 deletions
|
@ -553,8 +553,6 @@ void EditorNode::_update_from_settings() {
|
|||
tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color"));
|
||||
tree->set_debug_navigation_color(GLOBAL_GET("debug/shapes/navigation/geometry_color"));
|
||||
tree->set_debug_navigation_disabled_color(GLOBAL_GET("debug/shapes/navigation/disabled_geometry_color"));
|
||||
|
||||
_update_title();
|
||||
}
|
||||
|
||||
void EditorNode::_select_default_main_screen_plugin() {
|
||||
|
@ -584,7 +582,11 @@ void EditorNode::_notification(int p_what) {
|
|||
opening_prev = false;
|
||||
}
|
||||
|
||||
unsaved_cache = saved_version != editor_data.get_undo_redo().get_version();
|
||||
bool unsaved_cache_changed = false;
|
||||
if (unsaved_cache != (saved_version != editor_data.get_undo_redo().get_version())) {
|
||||
unsaved_cache = (saved_version != editor_data.get_undo_redo().get_version());
|
||||
unsaved_cache_changed = true;
|
||||
}
|
||||
|
||||
if (last_checked_version != editor_data.get_undo_redo().get_version()) {
|
||||
_update_scene_tabs();
|
||||
|
@ -614,6 +616,10 @@ void EditorNode::_notification(int p_what) {
|
|||
|
||||
ResourceImporterTexture::get_singleton()->update_imports();
|
||||
|
||||
if (settings_changed || unsaved_cache_changed) {
|
||||
_update_title();
|
||||
}
|
||||
|
||||
if (settings_changed) {
|
||||
_update_from_settings();
|
||||
settings_changed = false;
|
||||
|
|
Loading…
Reference in a new issue