diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-13 15:50:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-13 15:50:12 -0300 |
commit | fc54830f1aa84534233c2a599e0121eba4255a07 (patch) | |
tree | d518c6c8d0355f34602c804e863a1b0536c4d374 /tools | |
parent | b46bffd7ef87d0618e192b469dc4cf7207aac1ab (diff) | |
parent | c63ec998be918ada277d381520d6324a40325409 (diff) |
Merge pull request #5127 from bojidar-bg/asset-library-update-onshow
Update asset library assets only when opening the respective tab
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/asset_library_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp index 928acdbcbb..c571310ded 100644 --- a/tools/editor/asset_library_editor_plugin.cpp +++ b/tools/editor/asset_library_editor_plugin.cpp @@ -541,8 +541,12 @@ void EditorAssetLibrary::_notification(int p_what) { error_hb->add_child(tf); error_label->raise(); + } - _repository_changed(0); + if (p_what==NOTIFICATION_VISIBILITY_CHANGED) { + if(!is_hidden()) { + _repository_changed(0); // Update when shown for the first time + } } if (p_what==NOTIFICATION_PROCESS) { |