From de1785760c613c757c4aa8c69118903220a445d1 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 10 Nov 2021 11:30:48 +0100 Subject: [PATCH] Follow up https://github.com/prusa3d/PrusaSlicer/commit/e8be7b2ecd3a21676af73805f96157f37418f8e5 - Remove unused code --- src/slic3r/GUI/wxExtensions.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 8aead7a7c..01a553a81 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -460,33 +460,6 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in, return *bmp; } -wxBitmap create_scaled_bitmap(const std::string& bmp_name_in, - const std::string& new_color, // color witch will used instead of orange - wxWindow* win, - const int px_cnt/* = 16*/, - const bool grayscale/* = false*/) -{ - static Slic3r::GUI::BitmapCache cache; - - unsigned int width = 0; - unsigned int height = (unsigned int)(em_unit(win) * px_cnt * 0.1f + 0.5f); - - std::string bmp_name = bmp_name_in; - auto it = boost::find_last(bmp_name, ".png"); - assert(it == bmp_name.end()); // this function works just with SVGs - - bool dark_mode = Slic3r::GUI::wxGetApp().dark_mode(); - - // Try loading an SVG first, then PNG if SVG is not found: - wxBitmap* bmp = cache.load_svg(bmp_name, width, height, grayscale, dark_mode, new_color); - if (bmp == nullptr) { - // Neither SVG nor PNG has been found, raise error - throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name); - } - - return *bmp; -} - std::vector get_extruder_color_icons(bool thin_icon/* = false*/) { static Slic3r::GUI::BitmapCache bmp_cache;