diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 360c04aab..41d5231f1 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -117,13 +117,6 @@ int CLI::run(int argc, char **argv) // On Unix systems, the prusa-slicer binary may be symlinked to give the application a different meaning. boost::algorithm::iends_with(boost::filesystem::path(argv[0]).filename().string(), "gcodeviewer"); #endif // _WIN32 - bool start_as_medical = - boost::algorithm::iends_with(boost::filesystem::path(argv[0]).filename().string(), -#ifdef _WIN32 - "-medical.exe"); -#else - "-medical"); -#endif // _WIN32 const std::vector &load_configs = m_config.option("load", true)->values; const ForwardCompatibilitySubstitutionRule config_substitution_rule = m_config.option>("config_compatibility", true)->value; @@ -609,7 +602,6 @@ int CLI::run(int argc, char **argv) params.extra_config = std::move(m_extra_config); params.input_files = std::move(m_input_files); params.start_as_gcodeviewer = start_as_gcodeviewer; - params.start_as_medical = start_as_medical; return Slic3r::GUI::GUI_Run(params); #else // SLIC3R_GUI // No GUI support. Just print out a help. diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp index 350a98e67..749fc5ef2 100644 --- a/src/slic3r/GUI/BitmapCache.cpp +++ b/src/slic3r/GUI/BitmapCache.cpp @@ -20,7 +20,7 @@ namespace Slic3r { namespace GUI { -BitmapCache::BitmapCache(bool medical) : m_medical(medical) +BitmapCache::BitmapCache() { #ifdef __APPLE__ // Note: win->GetContentScaleFactor() is not used anymore here because it tends to @@ -280,9 +280,7 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_ if (dark_mode) replaces["#808080"] = "#FFFFFF"; if (!new_color.empty()) - replaces[m_medical ? "#5EA796" : "#ED6B21"] = new_color; - if (m_medical) - replaces["#ED6B21"] = "#5EA796"; + replaces["#ED6B21"] = new_color; NSVGimage *image = ::nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces); if (image == nullptr) diff --git a/src/slic3r/GUI/BitmapCache.hpp b/src/slic3r/GUI/BitmapCache.hpp index 654e4da75..5fa8643b5 100644 --- a/src/slic3r/GUI/BitmapCache.hpp +++ b/src/slic3r/GUI/BitmapCache.hpp @@ -14,7 +14,7 @@ namespace Slic3r { namespace GUI { class BitmapCache { public: - BitmapCache(bool medical); + BitmapCache(); ~BitmapCache() { clear(); } void clear(); double scale() { return m_scale; } @@ -42,7 +42,6 @@ public: static bool parse_color(const std::string& scolor, unsigned char* rgb_out); private: - bool m_medical; std::map m_map; double m_gs = 0.2; // value, used for image.ConvertToGreyscale(m_gs, m_gs, m_gs) double m_scale = 1.0; // value, used for correct scaling of SVG icons on Retina display diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index c4683bb5a..ad611114e 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -195,7 +195,7 @@ public: int width = lround(bmp.GetWidth() * 0.4); // load bitmap for logo - BitmapCache bmp_cache { wxGetApp().is_medical() }; + BitmapCache bmp_cache; int logo_size = lround(width * 0.25); wxBitmap logo_bmp = *bmp_cache.load_svg(wxGetApp().logo_name(), logo_size, logo_size); @@ -758,10 +758,9 @@ void GUI_App::post_init() IMPLEMENT_APP(GUI_App) -GUI_App::GUI_App(EAppMode mode, bool medical) +GUI_App::GUI_App(EAppMode mode) : wxApp() , m_app_mode(mode) - , m_medical(medical) , m_em_unit(10) , m_imgui(new ImGuiWrapper()) , m_removable_drive_manager(std::make_unique()) diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 117f51a17..1d281cafe 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -113,7 +113,6 @@ private: bool m_initialized { false }; bool m_app_conf_exists{ false }; EAppMode m_app_mode{ EAppMode::Editor }; - bool m_medical { false }; bool m_is_recreating_gui{ false }; #ifdef __linux__ bool m_opengl_initialized{ false }; @@ -160,13 +159,12 @@ public: bool OnInit() override; bool initialized() const { return m_initialized; } - explicit GUI_App(EAppMode mode = EAppMode::Editor, bool medical = false); + explicit GUI_App(EAppMode mode = EAppMode::Editor); ~GUI_App() override; EAppMode get_app_mode() const { return m_app_mode; } bool is_editor() const { return m_app_mode == EAppMode::Editor; } bool is_gcode_viewer() const { return m_app_mode == EAppMode::GCodeViewer; } - bool is_medical() const { return m_medical; } bool is_recreating_gui() const { return m_is_recreating_gui; } std::string logo_name() const { return is_editor() ? "PrusaSlicer" : "PrusaSlicer-gcodeviewer"; } diff --git a/src/slic3r/GUI/GUI_Init.cpp b/src/slic3r/GUI/GUI_Init.cpp index 7602476e9..92223a767 100644 --- a/src/slic3r/GUI/GUI_Init.cpp +++ b/src/slic3r/GUI/GUI_Init.cpp @@ -37,7 +37,7 @@ int GUI_Run(GUI_InitParams ¶ms) #endif // __APPLE__ try { - GUI::GUI_App* gui = new GUI::GUI_App(params.start_as_gcodeviewer ? GUI::GUI_App::EAppMode::GCodeViewer : GUI::GUI_App::EAppMode::Editor, params.start_as_medical); + GUI::GUI_App* gui = new GUI::GUI_App(params.start_as_gcodeviewer ? GUI::GUI_App::EAppMode::GCodeViewer : GUI::GUI_App::EAppMode::Editor); if (gui->get_app_mode() != GUI::GUI_App::EAppMode::GCodeViewer) { // G-code viewer is currently not performing instance check, a new G-code viewer is started every time. bool gui_single_instance_setting = gui->app_config->get("single_instance") == "1"; diff --git a/src/slic3r/GUI/GUI_Init.hpp b/src/slic3r/GUI/GUI_Init.hpp index 6b8ae468b..2adf618a4 100644 --- a/src/slic3r/GUI/GUI_Init.hpp +++ b/src/slic3r/GUI/GUI_Init.hpp @@ -21,7 +21,6 @@ struct GUI_InitParams std::vector input_files; bool start_as_gcodeviewer; - bool start_as_medical; }; int GUI_Run(GUI_InitParams ¶ms); diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 4312edf90..799c4e793 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -644,8 +644,6 @@ void MainFrame::update_title() #endif } } - if (wxGetApp().is_medical()) - boost::replace_first(build_id, "PrusaSlicer", "PrusaSlicer-medical"); title += wxString(build_id); if (wxGetApp().is_editor()) diff --git a/src/slic3r/GUI/ObjectDataViewModel.cpp b/src/slic3r/GUI/ObjectDataViewModel.cpp index bba6c6a80..ed4b477b8 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.cpp +++ b/src/slic3r/GUI/ObjectDataViewModel.cpp @@ -322,7 +322,7 @@ static int get_root_idx(ObjectDataViewModelNode *parent_node, const ItemType roo ObjectDataViewModel::ObjectDataViewModel() { - m_bitmap_cache = new Slic3r::GUI::BitmapCache { wxGetApp().is_medical() }; + m_bitmap_cache = new Slic3r::GUI::BitmapCache; m_volume_bmps = MenuFactory::get_volume_bitmaps(); m_warning_bmp = create_scaled_bitmap(WarningIcon); diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp index 12a905404..acae695d2 100644 --- a/src/slic3r/GUI/PresetComboBoxes.cpp +++ b/src/slic3r/GUI/PresetComboBoxes.cpp @@ -150,7 +150,7 @@ PresetComboBox::~PresetComboBox() BitmapCache& PresetComboBox::bitmap_cache() { - static BitmapCache bmps { wxGetApp().is_medical() }; + static BitmapCache bmps; return bmps; } diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index c22927495..ffa47ed63 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -123,7 +123,7 @@ wxBitmap ModelNode::get_bitmap(const wxString& color) const int icon_width = lround(6.4 * em); const int icon_height = lround(1.6 * em); - BitmapCache bmp_cache { wxGetApp().is_medical() }; + BitmapCache bmp_cache; unsigned char rgb[3]; BitmapCache::parse_color(into_u8(color), rgb); // there is no need to scale created solid bitmap diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 98146c962..01a553a81 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -432,7 +432,7 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in, const std::string& new_color/* = std::string()*/, // color witch will used instead of orange const bool menu_bitmap/* = false*/) { - static Slic3r::GUI::BitmapCache cache { Slic3r::GUI::wxGetApp().is_medical() }; + static Slic3r::GUI::BitmapCache cache; unsigned int width = 0; unsigned int height = (unsigned int)(em_unit(win) * px_cnt * 0.1f + 0.5f); @@ -462,7 +462,7 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in, std::vector get_extruder_color_icons(bool thin_icon/* = false*/) { - static Slic3r::GUI::BitmapCache bmp_cache { Slic3r::GUI::wxGetApp().is_medical() }; + static Slic3r::GUI::BitmapCache bmp_cache; // Create the bitmap with color bars. std::vector bmps;