summaryrefslogtreecommitdiff
path: root/pcr/freefilesync/revert_bulk_append.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/freefilesync/revert_bulk_append.patch')
-rw-r--r--pcr/freefilesync/revert_bulk_append.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/pcr/freefilesync/revert_bulk_append.patch b/pcr/freefilesync/revert_bulk_append.patch
new file mode 100644
index 000000000..9782134ec
--- /dev/null
+++ b/pcr/freefilesync/revert_bulk_append.patch
@@ -0,0 +1,55 @@
+diff -r -u a/FreeFileSync/Source/ui/command_box.cpp b/FreeFileSync/Source/ui/command_box.cpp
+--- a/FreeFileSync/Source/ui/command_box.cpp 2020-06-18 19:16:52.000000000 +0200
++++ b/FreeFileSync/Source/ui/command_box.cpp 2020-06-21 10:45:23.265579023 +0200
+@@ -120,7 +120,8 @@
+
+ //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!!
+ wxItemContainer::Clear(); //suffices to clear the selection items only!
+- this->Append(items); //expensive as fuck! => only call when absolutely needed!
++ for (const wxString& item : items)
++ this->Append(item);
+
+ //this->SetSelection(wxNOT_FOUND); //don't select anything
+ ChangeValue(value); //preserve main text!
+diff -r -u a/FreeFileSync/Source/ui/folder_history_box.cpp b/FreeFileSync/Source/ui/folder_history_box.cpp
+--- a/FreeFileSync/Source/ui/folder_history_box.cpp 2020-06-18 19:16:52.000000000 +0200
++++ b/FreeFileSync/Source/ui/folder_history_box.cpp 2020-06-21 10:45:23.265579023 +0200
+@@ -90,7 +90,8 @@
+
+ //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!!
+ wxItemContainer::Clear(); //suffices to clear the selection items only!
+- this->Append(items); //expensive as fuck! => only call when absolutely needed!
++ for (const wxString& item : items)
++ this->Append(item);
+
+ //this->SetSelection(wxNOT_FOUND); //don't select anything
+ ChangeValue(folderPathPhrase); //preserve main text!
+diff -r -u a/FreeFileSync/Source/ui/small_dlgs.cpp b/FreeFileSync/Source/ui/small_dlgs.cpp
+--- a/FreeFileSync/Source/ui/small_dlgs.cpp 2020-06-18 19:16:52.000000000 +0200
++++ b/FreeFileSync/Source/ui/small_dlgs.cpp 2020-06-21 11:35:53.494412284 +0200
+@@ -293,7 +293,9 @@
+ {
+ showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString()));
+ }
+- m_listBoxGdriveUsers->Append(gdriveAccounts);
++ for (auto const& account: gdriveAccounts) {
++ m_listBoxGdriveUsers->Append(account);
++ }
+
+ //set default values for Google Drive: use first item of m_listBoxGdriveUsers
+ if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase))
+diff -r -u a/wx+/choice_enum.h b/wx+/choice_enum.h
+--- a/wx+/choice_enum.h 2020-06-18 19:16:51.000000000 +0200
++++ b/wx+/choice_enum.h 2020-06-21 10:45:23.268912329 +0200
+@@ -79,7 +79,10 @@
+
+ if (items != itemsSetLast)
+ {
+- ctrl.Set(items); //expensive as fuck! => only call when absolutely needed!
++ ctrl.Clear();
++ for (auto item : items) {
++ ctrl.Append(item);
++ }
+ itemsSetLast = std::move(items);
+ }
+ //----------------------------------------------------------------- \ No newline at end of file