mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-03 23:21:15 +00:00 
			
		
		
		
	Merge pull request #103129 from KoBeWi/saving_fanatic
Avoid some excessive edits of resources
This commit is contained in:
		
						commit
						1e6b7f096e
					
				
					 3 changed files with 8 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1118,9 +1118,8 @@ void EditorAudioBuses::_notification(int p_what) {
 | 
			
		|||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			AudioServer::get_singleton()->set_edited(false);
 | 
			
		||||
 | 
			
		||||
			if (edited) {
 | 
			
		||||
				AudioServer::get_singleton()->set_edited(false);
 | 
			
		||||
				save_timer->start();
 | 
			
		||||
			}
 | 
			
		||||
		} break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -56,14 +56,14 @@ void EditorSettingsDialog::ok_pressed() {
 | 
			
		|||
	if (!EditorSettings::get_singleton()) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	_settings_save();
 | 
			
		||||
	timer->stop();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void EditorSettingsDialog::_settings_changed() {
 | 
			
		||||
	if (is_visible()) {
 | 
			
		||||
		timer->start();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
 | 
			
		||||
	String full_name = inspector->get_full_item_path(p_name);
 | 
			
		||||
| 
						 | 
				
			
			@ -174,6 +174,9 @@ void EditorSettingsDialog::_set_shortcut_input(const String &p_name, Ref<InputEv
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void EditorSettingsDialog::_settings_save() {
 | 
			
		||||
	if (!timer->is_stopped()) {
 | 
			
		||||
		timer->stop();
 | 
			
		||||
	}
 | 
			
		||||
	EditorSettings::get_singleton()->notify_changes();
 | 
			
		||||
	EditorSettings::get_singleton()->save();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -653,7 +653,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
 | 
			
		|||
 | 
			
		||||
	advanced = memnew(CheckButton);
 | 
			
		||||
	advanced->set_text(TTR("Advanced Settings"));
 | 
			
		||||
	advanced->connect(SceneStringName(toggled), callable_mp(this, &ProjectSettingsEditor::_advanced_toggled));
 | 
			
		||||
	search_bar->add_child(advanced);
 | 
			
		||||
 | 
			
		||||
	custom_properties = memnew(HBoxContainer);
 | 
			
		||||
| 
						 | 
				
			
			@ -774,6 +773,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
 | 
			
		|||
	if (use_advanced) {
 | 
			
		||||
		advanced->set_pressed(true);
 | 
			
		||||
	}
 | 
			
		||||
	advanced->connect(SceneStringName(toggled), callable_mp(this, &ProjectSettingsEditor::_advanced_toggled));
 | 
			
		||||
 | 
			
		||||
	_update_advanced(use_advanced);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue