mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Use current selection to determine proposed filename when exporting to stl files
This commit is contained in:
parent
369cdd8b3b
commit
6197f48321
3 changed files with 37 additions and 15 deletions
|
@ -1840,8 +1840,18 @@ wxString Plater::priv::get_export_file(GUI::FileType file_type)
|
|||
|
||||
// Update printbility state of each of the ModelInstances.
|
||||
this->update_print_volume_state();
|
||||
// Find the file name of the first printable object.
|
||||
fs::path output_file = this->model.propose_export_file_name_and_path();
|
||||
|
||||
const Selection& selection = get_selection();
|
||||
int obj_idx = selection.get_object_idx();
|
||||
|
||||
fs::path output_file;
|
||||
// first try to get the file name from the current selection
|
||||
if ((0 <= obj_idx) && (obj_idx < (int)this->model.objects.size()))
|
||||
output_file = this->model.objects[obj_idx]->get_export_filename();
|
||||
|
||||
if (output_file.empty())
|
||||
// Find the file name of the first printable object.
|
||||
output_file = this->model.propose_export_file_name_and_path();
|
||||
|
||||
wxString dlg_title;
|
||||
switch (file_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue