mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 13:26:58 +00:00
ENH: param multiple extruder indicator icon
Change-Id: I9e382dc72deaa0b682b1474c9b4094c31e550ad8 Jira: STUDIO-8872, STUDIO-9213 (cherry picked from commit dba496e1cc9cb293f63f950dd02f94e27b72fda1)
This commit is contained in:
@@ -801,9 +801,18 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool is_multi_extruder = false;
|
||||||
|
if (ctrl->opt_group->draw_multi_extruder)
|
||||||
|
for (const Option& opt : option_set)
|
||||||
|
is_multi_extruder |= opt.opt_id.find_last_of('#') != std::string::npos;
|
||||||
|
wxCoord icon_pos = h_pos;
|
||||||
|
if (is_multi_extruder) {
|
||||||
|
static ScalableBitmap multi_extruder(ctrl, "multi_extruder");
|
||||||
|
h_pos = draw_act_bmps(dc, wxPoint(h_pos, v_pos), multi_extruder.bmp(), multi_extruder.bmp(), false).x;
|
||||||
|
}
|
||||||
is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
|
is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
|
||||||
// BBS
|
// BBS
|
||||||
h_pos = draw_text(dc, wxPoint(h_pos, v_pos), label /* + ":" */, text_clr, ctrl->opt_group->label_width * ctrl->m_em_unit, is_url_string, true);
|
h_pos = draw_text(dc, wxPoint(h_pos, v_pos), label /* + ":" */, text_clr, icon_pos + ctrl->opt_group->label_width * ctrl->m_em_unit - h_pos, is_url_string, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's a widget, build it and set result to the correct position.
|
// If there's a widget, build it and set result to the correct position.
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ public:
|
|||||||
wxFont label_font {wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) };
|
wxFont label_font {wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) };
|
||||||
int sidetext_width{ -1 };
|
int sidetext_width{ -1 };
|
||||||
int sublabel_width{ -1 };
|
int sublabel_width{ -1 };
|
||||||
|
bool draw_multi_extruder { false };
|
||||||
|
|
||||||
/// Returns a copy of the pointer of the parent wxWindow.
|
/// Returns a copy of the pointer of the parent wxWindow.
|
||||||
/// Accessor function is because users are not allowed to change the parent
|
/// Accessor function is because users are not allowed to change the parent
|
||||||
|
|||||||
@@ -5135,6 +5135,7 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/)
|
|||||||
existed_page = i;
|
existed_page = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
m_rebuild_kinematics_page = false;
|
||||||
|
|
||||||
if (existed_page < n_before_extruders && (is_marlin_flavor || from_initial_build)) {
|
if (existed_page < n_before_extruders && (is_marlin_flavor || from_initial_build)) {
|
||||||
auto page = build_kinematics_page();
|
auto page = build_kinematics_page();
|
||||||
@@ -7724,6 +7725,7 @@ void Tab::switch_excluder(int extruder_id)
|
|||||||
if (opt.second.second >= 0) {
|
if (opt.second.second >= 0) {
|
||||||
const_cast<int &>(opt.second.second) = index;
|
const_cast<int &>(opt.second.second) = index;
|
||||||
page->m_opt_id_map.insert({opt.second.first + "#" + std::to_string(index), opt.first});
|
page->m_opt_id_map.insert({opt.second.first + "#" + std::to_string(index), opt.first});
|
||||||
|
group->draw_multi_extruder = !is_extruder && variant_ctrl->IsThisEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user