diff --git a/resources/icons/fdm_supports_.svg b/resources/icons/fdm_supports_.svg new file mode 100644 index 0000000000..3efd9c184c --- /dev/null +++ b/resources/icons/fdm_supports_.svg @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/resources/icons/mmu_segmentation_.svg b/resources/icons/mmu_segmentation_.svg new file mode 100644 index 0000000000..12d31fc266 --- /dev/null +++ b/resources/icons/mmu_segmentation_.svg @@ -0,0 +1,28 @@ + + + + + + diff --git a/resources/icons/seam_.svg b/resources/icons/seam_.svg new file mode 100644 index 0000000000..f909eee447 --- /dev/null +++ b/resources/icons/seam_.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/shape_gallery.svg b/resources/icons/shape_gallery.svg new file mode 100644 index 0000000000..a0b6fccf56 --- /dev/null +++ b/resources/icons/shape_gallery.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/resources/icons/sinking.svg b/resources/icons/sinking.svg new file mode 100644 index 0000000000..462b17120f --- /dev/null +++ b/resources/icons/sinking.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index d953626c4d..7c3c99dbc0 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1398,7 +1398,7 @@ void MainFrame::init_menubar_as_editor() if (!input_files.IsEmpty()) m_plater->sidebar().obj_list()->load_shape_object_from_gallery(input_files); } - }, "cog", nullptr, []() {return true; }, this); + }, "shape_gallery", nullptr, []() {return true; }, this); windowMenu->AppendSeparator(); append_menu_item(windowMenu, wxID_ANY, _L("Print &Host Upload Queue") + "\tCtrl+J", _L("Display the Print Host Upload Queue window"), diff --git a/src/slic3r/GUI/ObjectDataViewModel.cpp b/src/slic3r/GUI/ObjectDataViewModel.cpp index ed4b477b81..496cdcfc79 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.cpp +++ b/src/slic3r/GUI/ObjectDataViewModel.cpp @@ -46,10 +46,10 @@ struct InfoItemAtributes { const std::map INFO_ITEMS{ // info_item Type info_item Name info_item BitmapName - { InfoItemType::CustomSupports, {L("Paint-on supports"), "fdm_supports" }, }, - { InfoItemType::CustomSeam, {L("Paint-on seam"), "seam" }, }, - { InfoItemType::MmuSegmentation, {L("Multimaterial painting"), "mmu_segmentation"}, }, - { InfoItemType::Sinking, {L("Sinking"), "support_blocker"}, }, + { InfoItemType::CustomSupports, {L("Paint-on supports"), "fdm_supports_" }, }, + { InfoItemType::CustomSeam, {L("Paint-on seam"), "seam_" }, }, + { InfoItemType::MmuSegmentation, {L("Multimaterial painting"), "mmu_segmentation_"}, }, + { InfoItemType::Sinking, {L("Sinking"), "sinking"}, }, { InfoItemType::VariableLayerHeight, {L("Variable layer height"), "layers"}, }, }; @@ -1682,6 +1682,9 @@ void ObjectDataViewModel::Rescale() m_warning_bmp = create_scaled_bitmap(WarningIcon); m_warning_manifold_bmp = create_scaled_bitmap(WarningManifoldIcon); + for (auto item : INFO_ITEMS) + m_info_bmps[item.first] = create_scaled_bitmap(item.second.bmp_name); + wxDataViewItemArray all_items; GetAllChildren(wxDataViewItem(0), all_items); @@ -1705,6 +1708,8 @@ void ObjectDataViewModel::Rescale() node->m_bmp = create_scaled_bitmap(LayerRootIcon); case itLayer: node->m_bmp = create_scaled_bitmap(LayerIcon); + case itInfo: + node->m_bmp = m_info_bmps.at(node->m_info_item_type); break; default: break; } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index baa6fd4cef..197de43eeb 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -236,6 +236,7 @@ void ObjectInfo::show_sizer(bool show) void ObjectInfo::msw_rescale() { manifold_warning_icon->SetBitmap(create_scaled_bitmap(m_warning_icon_name)); + info_icon->SetBitmap(create_scaled_bitmap("info")); } void ObjectInfo::update_warning_icon(const std::string& warning_icon_name) @@ -1134,6 +1135,7 @@ void Sidebar::sys_color_changed() for (wxWindow* win : std::vector{ this, p->sliced_info->GetStaticBox(), p->object_info->GetStaticBox(), p->btn_reslice, p->btn_export_gcode }) wxGetApp().UpdateDarkUI(win); + p->object_info->msw_rescale(); for (wxWindow* win : std::vector{ p->scrolled, p->presets_panel }) wxGetApp().UpdateAllStaticTextDarkUI(win); for (wxWindow* btn : std::vector{ p->btn_reslice, p->btn_export_gcode }) diff --git a/src/slic3r/Utils/OctoPrint.cpp b/src/slic3r/Utils/OctoPrint.cpp index 0aec912c1d..6aa753404a 100644 --- a/src/slic3r/Utils/OctoPrint.cpp +++ b/src/slic3r/Utils/OctoPrint.cpp @@ -35,9 +35,16 @@ std::string substitute_host(const std::string& orig_addr, const std::string sub_ // userinfo size_t at = orig_addr.find("@"); host_start = (at != std::string::npos && at > host_start ? at + 1 : host_start); - // end of host, could be port, subpath (could be query or fragment?) - size_t host_end = orig_addr.find_first_of(":/?#", host_start); - host_end = (host_end == std::string::npos ? orig_addr.length() : host_end); + // end of host, could be port(:), subpath(/) (could be query(?) or fragment(#)?) + // or it will be ']' if address is ipv6 ) + size_t potencial_host_end = orig_addr.find_first_of(":/", host_start); + // if there are more ':' it must be ipv6 + if (potencial_host_end != std::string::npos && orig_addr[potencial_host_end] == ':' && orig_addr.rfind(':') != potencial_host_end) { + size_t ipv6_end = orig_addr.find(']', host_start); + // DK: Uncomment and replace orig_addr.length() if we want to allow subpath after ipv6 without [] parentheses. + potencial_host_end = (ipv6_end != std::string::npos ? ipv6_end + 1 : orig_addr.length()); //orig_addr.find('/', host_start)); + } + size_t host_end = (potencial_host_end != std::string::npos ? potencial_host_end : orig_addr.length()); // now host_start and host_end should mark where to put resolved addr // check host_start. if its nonsense, lets just use original addr (or resolved addr?) if (host_start >= orig_addr.length()) {