summaryrefslogtreecommitdiff
path: root/FreeFileSync/Source/ui/on_completion_box.h
diff options
context:
space:
mode:
Diffstat (limited to 'FreeFileSync/Source/ui/on_completion_box.h')
-rw-r--r--FreeFileSync/Source/ui/on_completion_box.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/FreeFileSync/Source/ui/on_completion_box.h b/FreeFileSync/Source/ui/on_completion_box.h
index c787ffe2..5d969b68 100644
--- a/FreeFileSync/Source/ui/on_completion_box.h
+++ b/FreeFileSync/Source/ui/on_completion_box.h
@@ -34,7 +34,8 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
- void initHistory(std::vector<Zstring>& history, size_t historyMax) { history_ = &history; historyMax_ = historyMax; }
+ void setHistory(const std::vector<Zstring>& history, size_t historyMax) { history_ = history; historyMax_ = historyMax; }
+ std::vector<Zstring> getHistory() const { return history_; }
void addItemHistory(); //adds current item to history
// use these two accessors instead of GetValue()/SetValue():
@@ -51,7 +52,7 @@ private:
void setValueAndUpdateList(const std::wstring& value);
- std::vector<Zstring>* history_ = nullptr;
+ std::vector<Zstring> history_;
size_t historyMax_ = 0;
const std::vector<std::pair<std::wstring, Zstring>> defaultCommands;
bgstack15