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,6 +283,7 @@ void FolderDisplay::OnUpdateUI(wxCommandEvent& event){
283283 AddItem (fd->subFolders [displayStartIndex]);
284284 }
285285
286+ // add files once
286287 if (displayStartIndex == 0 ){
287288 for (DirectoryData* file : fd->files ){
288289 AddItem (file);
@@ -315,14 +316,14 @@ void FolderDisplay::OnUpdateUI(wxCommandEvent& event){
315316 data->parent = old_parent;
316317
317318 UpdateTitle (false );
318- // add files once
319319 if (prog == 100 ){
320320 // update percents
321- auto count = data-> subFolders . size ();
322- for ( int i = 0 ; i < count; i++){
323- wxVariant v = wxAny ((long )(data-> subFolders [i] ->percentOfParent ()));
321+ for ( int i = 0 ; i < ListCtrl-> GetItemCount (); i++){
322+ DirectoryData* d = (DirectoryData*)(ListCtrl-> GetItemData (ListCtrl-> RowToItem (i)));
323+ wxVariant v = wxAny ((long )(d ->percentOfParent ()));
324324 ListCtrl->SetValue (v, i, 1 );
325325 }
326+
326327 // reconnect if applicable
327328 if (reloadParent != nullptr && updateItem.IsOk ()){
328329 reloadParent->SetItemData (updateItem, fd);
You can’t perform that action at this time.
0 commit comments