File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,12 +283,16 @@ void FolderDisplay::OnUpdateUI(wxCommandEvent& event){
283283 AddItem (fd->subFolders [displayStartIndex]);
284284 }
285285
286+ if (displayStartIndex == 0 ){
287+ for (DirectoryData* file : fd->files ){
288+ AddItem (file);
289+ }
290+ }
291+
286292 ++displayStartIndex;
287293 // update progress
288294 int prog = event.GetInt ();
289295
290- // add files once
291- if (prog == 100 ){
292296 auto old_parent = data->parent ;
293297 // update size in parent
294298 if (old_parent != nullptr ){
@@ -311,15 +315,14 @@ void FolderDisplay::OnUpdateUI(wxCommandEvent& event){
311315 data->parent = old_parent;
312316
313317 UpdateTitle (false );
318+ // add files once
319+ if (prog == 100 ){
314320 // update percents
315321 auto count = data->subFolders .size ();
316322 for (int i = 0 ; i < count; i++){
317323 wxVariant v = wxAny ((long )(data->subFolders [i]->percentOfParent ()));
318324 ListCtrl->SetValue (v, i, 1 );
319325 }
320- for (DirectoryData* file : fd->files ){
321- AddItem (file);
322- }
323326 // reconnect if applicable
324327 if (reloadParent != nullptr && updateItem.IsOk ()){
325328 reloadParent->SetItemData (updateItem, fd);
You can’t perform that action at this time.
0 commit comments