From d4f73ff1aa78dd1ac32252d23e513f9da7967e4b Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 13 Jun 2018 22:50:52 -0500 Subject: [PATCH] Fixed some typos, working on getting code to build. --- src/GUI/Dialogs/PresetEditor.cpp | 13 +++++-------- src/GUI/Dialogs/PresetEditor.hpp | 2 +- src/GUI/Dialogs/PrintEditor.cpp | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/GUI/Dialogs/PresetEditor.cpp b/src/GUI/Dialogs/PresetEditor.cpp index 5639e3e8d..dfe7fe796 100644 --- a/src/GUI/Dialogs/PresetEditor.cpp +++ b/src/GUI/Dialogs/PresetEditor.cpp @@ -3,6 +3,7 @@ #include "GUI.hpp" #include + namespace Slic3r { namespace GUI { PresetEditor::PresetEditor(wxWindow* parent, t_config_option_keys options) : @@ -40,7 +41,7 @@ PresetEditor::PresetEditor(wxWindow* parent, t_config_option_keys options) : left_sizer->Add(this->_treectrl, 1, wxEXPAND); this->_icons = new wxImageList(16, 16, 1); this->_treectrl->AssignImageList(this->_icons); - this->_iconcount = - 1; + this->_iconcount = -1; this->_treectrl->AddRoot("root"); this->_treectrl->SetIndent(0); @@ -80,10 +81,6 @@ void PresetEditor::select_preset(int id, bool force) { this->_on_select_preset(force); } -// TODO -void PresetEditor::delete_preset() { -} - void PresetEditor::select_preset_by_name(const wxString& name, bool force) { const auto presets {SLIC3RAPP->presets.at(this->typeId())}; int id = -1; @@ -100,14 +97,14 @@ void PresetEditor::select_preset_by_name(const wxString& name, bool force) { PresetPage* PresetEditor::add_options_page(const wxString& _title, const wxString& _icon) { if (_icon.size() > 0) { - auto* bitmap { new wxBitmap(var(_icon), wxBITMAPT_TYPE_PNG); - this->_icons.Add(bitmap); + auto* bitmap { new wxBitmap(var(_icon), wxBITMAP_TYPE_PNG); + this->_icons->Add(bitmap); this->_iconcount += 1; } PresetPage* page {new PresetPage(this, _title, this->_iconcount)}; page->Hide(); - this->sizer->Add(page, 1, wxEXPAND | wxLEFT, 5); + this->_sizer->Add(page, 1, wxEXPAND | wxLEFT, 5); _pages.push_back(page); return page; } diff --git a/src/GUI/Dialogs/PresetEditor.hpp b/src/GUI/Dialogs/PresetEditor.hpp index 372582bae..a6046c10b 100644 --- a/src/GUI/Dialogs/PresetEditor.hpp +++ b/src/GUI/Dialogs/PresetEditor.hpp @@ -280,7 +280,7 @@ protected: -class PresetPage : wxScrolledWindow { +class PresetPage : public wxScrolledWindow { public: PresetPage(wxWindow* parent, wxString _title, int _iconID) : wxScrolledWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL), diff --git a/src/GUI/Dialogs/PrintEditor.cpp b/src/GUI/Dialogs/PrintEditor.cpp index 7a121c9fb..2ddb26c73 100644 --- a/src/GUI/Dialogs/PrintEditor.cpp +++ b/src/GUI/Dialogs/PrintEditor.cpp @@ -11,7 +11,7 @@ PrintEditor::PrintEditor(wxWindow* parent, t_config_option_keys options) : this->_build(); } -void PrintEditor::_update() { +void PrintEditor::_update(const std::string& opt_key) { } void PrintEditor::_build() {