mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 20:23:53 +00:00
add explicit editor save tagging when saving
This commit is contained in:
parent
34e0e7de58
commit
bedbb2e893
@ -264,6 +264,9 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
|
||||
} else {
|
||||
EditorNode::get_singleton()->save_resource(edited_shaders[index].shader_inc);
|
||||
}
|
||||
if (edited_shaders[index].shader_editor) {
|
||||
edited_shaders[index].shader_editor->tag_saved_version();
|
||||
}
|
||||
} break;
|
||||
case FILE_SAVE_AS: {
|
||||
int index = shader_tabs->get_current_tab();
|
||||
@ -282,6 +285,9 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
|
||||
}
|
||||
EditorNode::get_singleton()->save_resource_as(edited_shaders[index].shader_inc, path);
|
||||
}
|
||||
if (edited_shaders[index].shader_editor) {
|
||||
edited_shaders[index].shader_editor->tag_saved_version();
|
||||
}
|
||||
} break;
|
||||
case FILE_INSPECT: {
|
||||
int index = shader_tabs->get_current_tab();
|
||||
|
@ -917,6 +917,10 @@ bool TextShaderEditor::is_unsaved() const {
|
||||
return shader_editor->get_text_editor()->get_saved_version() != shader_editor->get_text_editor()->get_version();
|
||||
}
|
||||
|
||||
void TextShaderEditor::tag_saved_version() {
|
||||
shader_editor->get_text_editor()->tag_saved_version();
|
||||
}
|
||||
|
||||
void TextShaderEditor::apply_shaders() {
|
||||
String editor_code = shader_editor->get_text_editor()->get_text();
|
||||
if (shader.is_valid()) {
|
||||
|
@ -190,6 +190,7 @@ public:
|
||||
void save_external_data(const String &p_str = "");
|
||||
void validate_script();
|
||||
bool is_unsaved() const;
|
||||
void tag_saved_version();
|
||||
|
||||
virtual Size2 get_minimum_size() const override { return Size2(0, 200); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user