Skip to content

Commit f67c3a2

Browse files
committed
More dynamic display
FolderDisplay.cpp ~ display files immediately instead of waiting ~ update titlebars and displays on every progress update
1 parent c4d4cc2 commit f67c3a2

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

source/FolderDisplay.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)