Improve editor state initialization

This commit is contained in:
kobewi
2023-04-01 15:18:13 +02:00
parent 1db9de5406
commit 13c8a9890d
2 changed files with 16 additions and 7 deletions

View File

@@ -296,6 +296,13 @@ Dictionary EditorData::get_scene_editor_states(int p_idx) const {
}
void EditorData::set_editor_states(const Dictionary &p_states) {
if (p_states.is_empty()) {
for (EditorPlugin *ep : editor_plugins) {
ep->clear();
}
return;
}
List<Variant> keys;
p_states.get_key_list(&keys);