mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-26 20:59:16 -07:00
Merge remote-tracking branch 'origin/master' into ys_new_features
This commit is contained in:
@@ -52,7 +52,7 @@ struct LifetimeGuard
|
||||
};
|
||||
|
||||
BonjourDialog::BonjourDialog(wxWindow *parent, Slic3r::PrinterTechnology tech)
|
||||
: wxDialog(parent, wxID_ANY, _(L("Network lookup")), wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER)
|
||||
: wxDialog(parent, wxID_ANY, _(L("Network lookup")), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
||||
, list(new wxListView(this, wxID_ANY))
|
||||
, replies(new ReplySet)
|
||||
, label(new wxStaticText(this, wxID_ANY, ""))
|
||||
|
||||
@@ -944,6 +944,7 @@ wxNotebook* GUI_App::tab_panel() const
|
||||
return mainframe->m_tabpanel;
|
||||
}
|
||||
|
||||
// extruders count from selected printer preset
|
||||
int GUI_App::extruders_cnt() const
|
||||
{
|
||||
const Preset& preset = preset_bundle->printers.get_selected_preset();
|
||||
@@ -951,6 +952,14 @@ int GUI_App::extruders_cnt() const
|
||||
preset.config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
}
|
||||
|
||||
// extruders count from edited printer preset
|
||||
int GUI_App::extruders_edited_cnt() const
|
||||
{
|
||||
const Preset& preset = preset_bundle->printers.get_edited_preset();
|
||||
return preset.printer_technology() == ptSLA ? 1 :
|
||||
preset.config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
}
|
||||
|
||||
void GUI_App::open_web_page_localized(const std::string &http_address)
|
||||
{
|
||||
wxLaunchDefaultBrowser(http_address + "&lng=" + this->current_language_code());
|
||||
|
||||
@@ -167,6 +167,7 @@ public:
|
||||
|
||||
wxNotebook* tab_panel() const ;
|
||||
int extruders_cnt() const;
|
||||
int extruders_edited_cnt() const;
|
||||
|
||||
std::vector<Tab *> tabs_list;
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ wxBitmapComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(15 *
|
||||
/* In a case of a multi-material printing, for editing another Filament Preset
|
||||
* it's needed to select this preset for the "Filament settings" Tab
|
||||
*/
|
||||
if (preset_type == Preset::TYPE_FILAMENT && wxGetApp().extruders_cnt() > 1)
|
||||
if (preset_type == Preset::TYPE_FILAMENT && wxGetApp().extruders_edited_cnt() > 1)
|
||||
{
|
||||
const std::string& selected_preset = GetString(GetSelection()).ToUTF8().data();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user