mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 23:48:44 +03:00
Merge branch 'main' of https://github.com/QIDITECH/QIDISlicer
This commit is contained in:
@@ -90,6 +90,8 @@ void AppConfig::set_defaults()
|
||||
set("associate_3mf", "0");
|
||||
if (get("associate_stl").empty())
|
||||
set("associate_stl", "0");
|
||||
if (get("associate_step").empty())
|
||||
set("associate_step", "0");
|
||||
|
||||
if (get("tabs_as_menu").empty())
|
||||
set("tabs_as_menu", "0");
|
||||
|
||||
@@ -888,9 +888,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("extra_perimeters", coBool);
|
||||
def->label = L("Extra perimeters if needed");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Add more perimeters when needed for avoiding gaps in sloping walls. "
|
||||
"Slic3r keeps adding perimeters, until more than 70% of the loop immediately above "
|
||||
"is supported.");
|
||||
def->tooltip = L("Add more perimeters when needed for avoiding gaps in sloping walls. Slic3r keeps adding "
|
||||
"perimeters, until more than 70% of the loop immediately above is supported.");
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
|
||||
@@ -1610,11 +1610,13 @@ PageFilesAssociation::PageFilesAssociation(ConfigWizard* parent)
|
||||
{
|
||||
cb_3mf = new wxCheckBox(this, wxID_ANY, _L("Associate .3mf files to QIDISlicer"));
|
||||
cb_stl = new wxCheckBox(this, wxID_ANY, _L("Associate .stl files to QIDISlicer"));
|
||||
// cb_gcode = new wxCheckBox(this, wxID_ANY, _L("Associate .gcode files to QIDISlicer G-code Viewer"));
|
||||
cb_step = new wxCheckBox(this, wxID_ANY, _L("Associate .step/.stp files to QIDISlicer"));
|
||||
// cb_gcode = new wxCheckBox(this, wxID_ANY, _L("Associate .gcode files to QIDISlicer G-code Viewer"));
|
||||
|
||||
append(cb_3mf);
|
||||
append(cb_stl);
|
||||
// append(cb_gcode);
|
||||
append(cb_step);
|
||||
// append(cb_gcode);
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
@@ -3268,13 +3270,16 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
||||
#ifdef _WIN32
|
||||
app_config->set("associate_3mf", page_files_association->associate_3mf() ? "1" : "0");
|
||||
app_config->set("associate_stl", page_files_association->associate_stl() ? "1" : "0");
|
||||
// app_config->set("associate_gcode", page_files_association->associate_gcode() ? "1" : "0");
|
||||
app_config->set("associate_step", page_files_association->associate_step() ? "1" : "0");
|
||||
// app_config->set("associate_gcode", page_files_association->associate_gcode() ? "1" : "0");
|
||||
|
||||
if (wxGetApp().is_editor()) {
|
||||
if (page_files_association->associate_3mf())
|
||||
wxGetApp().associate_3mf_files();
|
||||
if (page_files_association->associate_stl())
|
||||
wxGetApp().associate_stl_files();
|
||||
if (page_files_association->associate_step())
|
||||
wxGetApp().associate_step_files();
|
||||
}
|
||||
// else {
|
||||
// if (page_files_association->associate_gcode())
|
||||
|
||||
@@ -439,6 +439,7 @@ struct PageFilesAssociation : ConfigWizardPage
|
||||
private:
|
||||
wxCheckBox* cb_3mf{ nullptr };
|
||||
wxCheckBox* cb_stl{ nullptr };
|
||||
wxCheckBox* cb_step{ nullptr };
|
||||
// wxCheckBox* cb_gcode;
|
||||
|
||||
public:
|
||||
@@ -446,7 +447,8 @@ public:
|
||||
|
||||
bool associate_3mf() const { return cb_3mf->IsChecked(); }
|
||||
bool associate_stl() const { return cb_stl->IsChecked(); }
|
||||
// bool associate_gcode() const { return cb_gcode->IsChecked(); }
|
||||
bool associate_step() const { return cb_step->IsChecked(); }
|
||||
// bool associate_gcode() const { return cb_gcode->IsChecked(); }
|
||||
};
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
@@ -1291,6 +1291,8 @@ bool GUI_App::on_init_inner()
|
||||
associate_3mf_files();
|
||||
if (app_config->get_bool("associate_stl"))
|
||||
associate_stl_files();
|
||||
if (app_config->get_bool("associate_step"))
|
||||
associate_step_files();
|
||||
#endif // __WXMSW__
|
||||
|
||||
preset_updater = new PresetUpdater();
|
||||
@@ -2605,6 +2607,8 @@ void GUI_App::open_preferences(const std::string& highlight_option /*= std::stri
|
||||
associate_3mf_files();
|
||||
if (app_config->get_bool("associate_stl"))
|
||||
associate_stl_files();
|
||||
if (app_config->get_bool("associate_step"))
|
||||
associate_step_files();
|
||||
}
|
||||
else {
|
||||
if (app_config->get_bool("associate_gcode"))
|
||||
@@ -3389,6 +3393,12 @@ void GUI_App::associate_stl_files()
|
||||
associate_file_type(L".stl", L"QIDI.Slicer.1", L"QIDISlicer", true);
|
||||
}
|
||||
|
||||
void GUI_App::associate_step_files()
|
||||
{
|
||||
associate_file_type(L".step", L"QIDI.Slicer.1", L"QIDISlicer", true);
|
||||
associate_file_type(L".stp", L"QIDI.Slicer.1", L"QIDISlicer", true);
|
||||
}
|
||||
|
||||
void GUI_App::associate_gcode_files()
|
||||
{
|
||||
associate_file_type(L".gcode", L"QIDISlicer.GCodeViewer.1", L"QIDISlicerGCodeViewer", true);
|
||||
|
||||
@@ -373,6 +373,7 @@ public:
|
||||
#ifdef __WXMSW__
|
||||
void associate_3mf_files();
|
||||
void associate_stl_files();
|
||||
void associate_step_files();
|
||||
void associate_gcode_files();
|
||||
#endif // __WXMSW__
|
||||
|
||||
|
||||
@@ -279,6 +279,11 @@ void PreferencesDialog::build()
|
||||
L("Associate .stl files to QIDISlicer"),
|
||||
L("If enabled, sets QIDISlicer as default application to open .stl files."),
|
||||
app_config->get_bool("associate_stl"));
|
||||
|
||||
append_bool_option(m_optgroup_general, "associate_step",
|
||||
L("Associate .stp files to QIDISlicer"),
|
||||
L("If enabled, sets QIDISlicer as default application to open .stp files."),
|
||||
app_config->get_bool("associate_step"));
|
||||
#endif // _WIN32
|
||||
|
||||
m_optgroup_general->append_separator();
|
||||
|
||||
Reference in New Issue
Block a user