trying to get the export dialog for zip files.
This commit is contained in:
parent
c6695538a9
commit
90c38daeae
@ -75,8 +75,7 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model,
|
||||
return APPLY_STATUS_UNCHANGED;
|
||||
|
||||
// Temporary quick fix, just invalidate everything.
|
||||
{
|
||||
std::cout << "deleting object cache " << std::endl;
|
||||
{
|
||||
for (SLAPrintObject *print_object : m_objects) {
|
||||
print_object->invalidate_all_steps();
|
||||
delete print_object;
|
||||
|
@ -48,6 +48,7 @@ const wxString file_wildcards[FT_SIZE] = {
|
||||
|
||||
/* FT_INI */ "INI files *.ini|*.ini;*.INI",
|
||||
/* FT_SVG */ "SVG files *.svg|*.svg;*.SVG",
|
||||
/* FT_PNGZIP */"Zipped PNG files *.zip|*.zip;*.ZIP", // This is lame, but that's what we use for SLA
|
||||
};
|
||||
|
||||
|
||||
@ -715,4 +716,4 @@ wxNotebook* GUI_App::tab_panel() const
|
||||
|
||||
|
||||
} // GUI
|
||||
} //Slic3r
|
||||
} //Slic3r
|
||||
|
@ -38,6 +38,7 @@ enum FileType
|
||||
|
||||
FT_INI,
|
||||
FT_SVG,
|
||||
FT_PNGZIP,
|
||||
|
||||
FT_SIZE,
|
||||
};
|
||||
@ -152,4 +153,4 @@ DECLARE_APP(GUI_App)
|
||||
} // GUI
|
||||
} //Slic3r
|
||||
|
||||
#endif // slic3r_GUI_App_hpp_
|
||||
#endif // slic3r_GUI_App_hpp_
|
||||
|
@ -255,8 +255,6 @@ void MainFrame::init_menubar()
|
||||
fileMenu->AppendSeparator();
|
||||
append_menu_item(fileMenu, wxID_ANY, _(L("Slice to SV&G…\tCtrl+G")), _(L("Slice file to a multi-layer SVG")),
|
||||
[this](wxCommandEvent&) { quick_slice(qsSaveAs | qsExportSVG); }, "shape_handles.png");
|
||||
append_menu_item(fileMenu, wxID_ANY, _(L("Slice to PNG…")), _(L("Slice file to a set of PNG files")),
|
||||
[this](wxCommandEvent&) { slice_to_png(); /*$self->quick_slice(save_as = > 0, export_png = > 1);*/ }, "shape_handles.png");
|
||||
m_menu_item_reslice_now = append_menu_item(fileMenu, wxID_ANY, _(L("(&Re)Slice Now\tCtrl+S")), _(L("Start new slicing process")),
|
||||
[this](wxCommandEvent&) { reslice_now(); }, "shape_handles.png");
|
||||
fileMenu->AppendSeparator();
|
||||
@ -358,13 +356,6 @@ void MainFrame::init_menubar()
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::slice_to_png()
|
||||
{
|
||||
// m_plater->stop_background_process();
|
||||
// m_plater->async_apply_config();
|
||||
// m_appController->print_ctl()->slice_to_png();
|
||||
}
|
||||
|
||||
// To perform the "Quck Slice", "Quick Slice and Save As", "Repeat last Quick Slice" and "Slice to SVG".
|
||||
void MainFrame::quick_slice(const int qs)
|
||||
{
|
||||
|
@ -83,7 +83,6 @@ public:
|
||||
bool is_loaded() const { return m_loaded; }
|
||||
bool is_last_input_file() const { return !m_qs_last_input_file.IsEmpty(); }
|
||||
|
||||
void slice_to_png();
|
||||
void quick_slice(const int qs = qsUndef);
|
||||
void reslice_now();
|
||||
void repair_stl();
|
||||
|
@ -2185,10 +2185,14 @@ void Plater::export_gcode(fs::path output_path)
|
||||
// FIXME: ^ errors to handle?
|
||||
));
|
||||
auto start_dir = wxGetApp().app_config->get_last_output_dir(default_output_file.parent_path().string());
|
||||
wxFileDialog dlg(this, _(L("Save G-code file as:")),
|
||||
|
||||
auto fileType = printer_technology() == ptFFF ? FT_GCODE : FT_PNGZIP;
|
||||
std::string dtitle = printer_technology() == ptFFF ? L("Save G-code file as:")
|
||||
: L("Save Zip file as:");
|
||||
wxFileDialog dlg(this, _(dtitle),
|
||||
start_dir,
|
||||
default_output_file.filename().string(),
|
||||
GUI::file_wildcards[FT_GCODE],
|
||||
GUI::file_wildcards[fileType],
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user