From b413cf4ef9828516daf4c151e453971d4870e999 Mon Sep 17 00:00:00 2001
From: YuSanka <yusanka@gmail.com>
Date: Mon, 15 Oct 2018 11:39:48 +0200
Subject: [PATCH] Fixed OSX compilation : GetStringSelection for PresetComboBox
 is changed to GetString(GetSelection)

---
 src/slic3r/GUI/Plater.cpp | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 6bae93b95..f22b70074 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -1512,8 +1512,17 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
 
     auto idx = combo->get_extruder_idx();
 
+    //! Because of The MSW and GTK version of wxBitmapComboBox derived from wxComboBox, 
+    //! but the OSX version derived from wxOwnerDrawnCombo.
+    //! So, to get selected string we do 
+    //!     combo->GetString(combo->GetSelection()) 
+    //! instead of 
+    //!     combo->GetStringSelection().ToStdString()); 
+
+    std::string selected_string = combo->GetString(combo->GetSelection()).ToUTF8().data();
+
     if (preset_type == Preset::TYPE_FILAMENT) {
-        wxGetApp().preset_bundle->set_filament_preset(idx, combo->GetStringSelection().ToStdString());
+        wxGetApp().preset_bundle->set_filament_preset(idx, selected_string);
     }
 
     // TODO: ?
@@ -1524,7 +1533,7 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
     else {
         for (Tab* tab : wxGetApp().tabs_list) {
             if (tab->type() == preset_type) {
-                tab->select_preset(combo->GetStringSelection().ToStdString());
+                tab->select_preset(selected_string);
                 break;
             }
         }
@@ -1532,9 +1541,9 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
 
     // Synchronize config.ini with the current selections.
     wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
-    // TODO:
-    // # get new config and generate on_config_change() event for updating plater and other things
-    // $self->on_config_change(wxTheApp->{preset_bundle}->full_config);
+    // update plater with new config
+    auto config = wxGetApp().preset_bundle->full_config();
+    wxGetApp().plater()->on_config_change(&config);
 }
 
 void Plater::priv::on_progress_event()