From 4be4dc623c097b529b417692c543eae5ec6e4c5c Mon Sep 17 00:00:00 2001
From: YuSanka <yusanka@gmail.com>
Date: Fri, 3 May 2019 13:09:42 +0200
Subject: [PATCH] Fixed full statistics calculation  (calculate sum of volume
 and part_count only for solid parts)

---
 src/libslic3r/Model.cpp                   | 19 ++++++++++---------
 src/slic3r/GUI/GUI_App.cpp                |  8 ++++----
 src/slic3r/GUI/GUI_ObjectManipulation.cpp |  5 ++++-
 src/slic3r/GUI/Plater.cpp                 |  2 +-
 4 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp
index 271b728b5..ec95eb578 100644
--- a/src/libslic3r/Model.cpp
+++ b/src/libslic3r/Model.cpp
@@ -1467,17 +1467,18 @@ stl_stats ModelObject::get_object_stl_stats() const
         const stl_stats& stats = volume->mesh.stl.stats;
 
         // initialize full_stats (for repaired errors)
-        full_stats.degenerate_facets+= stats.degenerate_facets;
-        full_stats.edges_fixed      += stats.edges_fixed;
-        full_stats.facets_removed   += stats.facets_removed;
-        full_stats.facets_added     += stats.facets_added;
-        full_stats.facets_reversed  += stats.facets_reversed;
-        full_stats.backwards_edges  += stats.backwards_edges;
+        full_stats.degenerate_facets    += stats.degenerate_facets;
+        full_stats.edges_fixed          += stats.edges_fixed;
+        full_stats.facets_removed       += stats.facets_removed;
+        full_stats.facets_added         += stats.facets_added;
+        full_stats.facets_reversed      += stats.facets_reversed;
+        full_stats.backwards_edges      += stats.backwards_edges;
 
         // another used satistics value
-        if (volume->is_model_part())
-            full_stats.volume       += stats.volume;
-        full_stats.number_of_parts  += stats.number_of_parts;
+        if (volume->is_model_part()) {
+            full_stats.volume           += stats.volume;
+            full_stats.number_of_parts  += stats.number_of_parts;
+        }
     }
 
     return full_stats;
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 595a968bd..47141a664 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -303,13 +303,13 @@ bool GUI_App::dark_mode_menus()
 void GUI_App::init_label_colours()
 {
     if (dark_mode()) {
-        m_color_label_modified = wxColour(252, 77, 1);
-        m_color_label_sys = wxColour(26, 132, 57);
-    }
-    else {
         m_color_label_modified = wxColour(253, 111, 40);
         m_color_label_sys = wxColour(115, 220, 103);
     }
+    else {
+        m_color_label_modified = wxColour(252, 77, 1);
+        m_color_label_sys = wxColour(26, 132, 57);
+    }
     m_color_label_default = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
 }
 
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
index b8c37dcd0..d50f03050 100644
--- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp
+++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
@@ -21,9 +21,9 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
     OG_Settings(parent, true)
 #ifndef __APPLE__
     , m_focused_option("")
-    , m_manifold_warning_bmp(ScalableBitmap(parent, "exclamation"))
 #endif // __APPLE__
 {
+    m_manifold_warning_bmp = ScalableBitmap(parent, "exclamation");
     m_og->set_name(_(L("Object Manipulation")));
     m_og->label_width = 12;//125;
     m_og->set_grid_vgap(5);
@@ -77,6 +77,9 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
     def.gui_type = "legend";
     def.tooltip = L("Object name");
     def.width = 21;
+#ifdef __APPLE__
+    def.width = 19;
+#endif
     def.default_value = new ConfigOptionString{ " " };
     line.append_option(Option(def, "object_name"));
     m_og->append_line(line);
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 07e1e2bae..97845f8be 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -724,7 +724,7 @@ Sidebar::Sidebar(Plater *parent)
 
     auto init_btn = [this](wxButton **btn, wxString label) {
         *btn = new wxButton(this, wxID_ANY, label, wxDefaultPosition, 
-                            wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER);
+                            wxDefaultSize, wxBU_EXACTFIT);
         (*btn)->SetFont(wxGetApp().bold_font());
     };