소스 검색

Update asset library assets only when opening the respective tab

Bojidar Marinov 9 년 전
부모
커밋
c63ec998be
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      tools/editor/asset_library_editor_plugin.cpp

+ 5 - 1
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) {