mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-21 20:25:20 +00:00
Fix extruder page title
This commit is contained in:
@@ -633,8 +633,11 @@ Slic3r::GUI::PageShp Tab::add_options_page(const wxString& title, const std::str
|
||||
wxString Tab::translate_category(const wxString& title, Preset::Type preset_type)
|
||||
{
|
||||
if (preset_type == Preset::TYPE_PRINTER && title.Contains("Extruder ")) {
|
||||
auto preset = wxGetApp().preset_bundle;
|
||||
if (preset && preset->is_bbl_vendor()) {
|
||||
if (title == "Extruder 1") return _("Left Extruder");
|
||||
if (title == "Extruder 2") return _("Right Extruder");
|
||||
}
|
||||
return _("Extruder") + title.SubString(8, title.Last());
|
||||
}
|
||||
return _(title);
|
||||
@@ -4767,20 +4770,10 @@ if (is_marlin_flavor)
|
||||
|
||||
// Orca: build missed extruder pages
|
||||
for (auto extruder_idx = m_extruders_count_old; extruder_idx < m_extruders_count; ++extruder_idx) {
|
||||
// auto extruder_idx = 0;
|
||||
const wxString& page_name = wxString::Format(_L("Extruder %d"), int(extruder_idx + 1));
|
||||
bool page_exist = false;
|
||||
for (auto page_temp : m_pages) {
|
||||
if (page_temp->title() == page_name) {
|
||||
page_exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const wxString& page_name = (m_extruders_count > 1) ? wxString::Format("Extruder %d", int(extruder_idx + 1)) : wxString::Format("Extruder");
|
||||
|
||||
if (!page_exist)
|
||||
{
|
||||
//# build page
|
||||
//const wxString& page_name = wxString::Format(_L("Extruder %d"), int(extruder_idx + 1));
|
||||
//const wxString& page_name = wxString::Format("Extruder %d", int(extruder_idx + 1));
|
||||
auto page = add_options_page(page_name, "custom-gcode_extruder", true); // ORCA: icon only visible on placeholders
|
||||
m_pages.insert(m_pages.begin() + n_before_extruders + extruder_idx, page);
|
||||
|
||||
@@ -4898,7 +4891,6 @@ if (is_marlin_flavor)
|
||||
//optgroup->append_line(line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// BBS. No extra extruder page for single physical extruder machine
|
||||
// # remove extra pages
|
||||
auto &first_extruder_title = const_cast<wxString &>(m_pages[n_before_extruders]->title());
|
||||
|
||||
Reference in New Issue
Block a user