mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Workaround for OSX file picker. Saving SL1S files did not work, the file
picker replaced the SL1S extension with SL1.
This commit is contained in:
parent
26822347ed
commit
14330b02b3
3 changed files with 8 additions and 3 deletions
|
@ -435,7 +435,9 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
||||||
|
|
||||||
/* FT_TEX */ "Texture (*.png, *.svg)|*.png;*.PNG;*.svg;*.SVG",
|
/* FT_TEX */ "Texture (*.png, *.svg)|*.png;*.PNG;*.svg;*.SVG",
|
||||||
|
|
||||||
/* FT_PNGZIP */ "Masked SLA files (*.sl1, *.sl1s)|*.sl1;*.SL1;*.sl1s;*.SL1S",
|
/* FT_SL1 */ "Masked SLA files (*.sl1, *.sl1s)|*.sl1;*.SL1;*.sl1s;*.SL1S",
|
||||||
|
// Workaround for OSX file picker, for some reason it always saves with the 1st extension.
|
||||||
|
/* FT_SL1S */ "Masked SLA files (*.sl1s, *.sl1)|*.sl1s;*.SL1S;*.sl1;*.SL1",
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string out = defaults[file_type];
|
std::string out = defaults[file_type];
|
||||||
|
|
|
@ -66,7 +66,9 @@ enum FileType
|
||||||
|
|
||||||
FT_TEX,
|
FT_TEX,
|
||||||
|
|
||||||
FT_PNGZIP,
|
FT_SL1,
|
||||||
|
// Workaround for OSX file picker, for some reason it always saves with the 1st extension.
|
||||||
|
FT_SL1S,
|
||||||
|
|
||||||
FT_SIZE,
|
FT_SIZE,
|
||||||
};
|
};
|
||||||
|
|
|
@ -5303,10 +5303,11 @@ void Plater::export_gcode(bool prefer_removable)
|
||||||
|
|
||||||
fs::path output_path;
|
fs::path output_path;
|
||||||
{
|
{
|
||||||
|
std::string ext = default_output_file.extension().string();
|
||||||
wxFileDialog dlg(this, (printer_technology() == ptFFF) ? _L("Save G-code file as:") : _L("Save SL1 / SL1S file as:"),
|
wxFileDialog dlg(this, (printer_technology() == ptFFF) ? _L("Save G-code file as:") : _L("Save SL1 / SL1S file as:"),
|
||||||
start_dir,
|
start_dir,
|
||||||
from_path(default_output_file.filename()),
|
from_path(default_output_file.filename()),
|
||||||
GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : FT_PNGZIP, default_output_file.extension().string()),
|
GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : boost::iequals(ext, ".sl1s") ? FT_SL1S : FT_SL1, ext),
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
|
||||||
);
|
);
|
||||||
if (dlg.ShowModal() == wxID_OK)
|
if (dlg.ShowModal() == wxID_OK)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue