Fix closing Theme Editor not actually closing it

This commit is contained in:
kobewi
2024-09-27 16:32:27 +02:00
parent 76a135926a
commit 66d2b0fc6a
7 changed files with 30 additions and 68 deletions

View File

@@ -3179,6 +3179,10 @@ void EditorPropertyResource::_update_preferred_shader() {
}
}
bool EditorPropertyResource::_should_stop_editing() const {
return !resource_picker->is_toggle_pressed();
}
void EditorPropertyResource::_viewport_selected(const NodePath &p_path) {
Node *to_node = get_node(p_path);
if (!Object::cast_to<Viewport>(to_node)) {
@@ -3357,6 +3361,10 @@ void EditorPropertyResource::_notification(int p_what) {
}
}
void EditorPropertyResource::_bind_methods() {
ClassDB::bind_method(D_METHOD("_should_stop_editing"), &EditorPropertyResource::_should_stop_editing);
}
EditorPropertyResource::EditorPropertyResource() {
use_sub_inspector = bool(EDITOR_GET("interface/inspector/open_resources_in_current_inspector"));
has_borders = true;