Use default last directory when we try to save a project with objects from Gallery

This commit is contained in:
YuSanka 2021-07-26 11:34:35 +02:00
parent 06e2835f83
commit a113f227f5

View File

@ -2653,8 +2653,11 @@ wxString Plater::priv::get_export_file(GUI::FileType file_type)
default: break;
}
std::string dir = (boost::filesystem::path(output_file).parent_path()).string();
bool use_def_out_dir = dir == sys_shapes_dir() || dir == custom_shapes_dir();
wxFileDialog dlg(q, dlg_title,
from_path(output_file.parent_path()), from_path(output_file.filename()),
use_def_out_dir ? from_u8(wxGetApp().app_config->get_last_dir()) : from_path(output_file.parent_path()), from_path(output_file.filename()),
wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() != wxID_OK)