mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Revert "Show dialog when opening 3mf files to choose whether to import settings. (#4110)"
This reverts commit 8ce07d3e8e
.
This commit is contained in:
parent
7f7dddaeed
commit
1101ed9955
1 changed files with 15 additions and 13 deletions
|
@ -10315,21 +10315,23 @@ bool Plater::open_3mf_file(const fs::path &file_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadType load_type = LoadType::Unknown;
|
LoadType load_type = LoadType::Unknown;
|
||||||
|
if (!model().objects.empty()) {
|
||||||
bool show_drop_project_dialog = true;
|
bool show_drop_project_dialog = true;
|
||||||
if (show_drop_project_dialog) {
|
if (show_drop_project_dialog) {
|
||||||
ProjectDropDialog dlg(filename);
|
ProjectDropDialog dlg(filename);
|
||||||
if (dlg.ShowModal() == wxID_OK) {
|
if (dlg.ShowModal() == wxID_OK) {
|
||||||
int choice = dlg.get_action();
|
int choice = dlg.get_action();
|
||||||
load_type = static_cast<LoadType>(choice);
|
load_type = static_cast<LoadType>(choice);
|
||||||
wxGetApp().app_config->set("import_project_action", std::to_string(choice));
|
wxGetApp().app_config->set("import_project_action", std::to_string(choice));
|
||||||
|
|
||||||
// BBS: jump to plater panel
|
// BBS: jump to plater panel
|
||||||
wxGetApp().mainframe->select_tab(MainFrame::tp3DEditor);
|
wxGetApp().mainframe->select_tab(MainFrame::tp3DEditor);
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
load_type = static_cast<LoadType>(
|
||||||
|
std::clamp(std::stoi(wxGetApp().app_config->get("import_project_action")), static_cast<int>(LoadType::OpenProject), static_cast<int>(LoadType::LoadConfig)));
|
||||||
} else
|
} else
|
||||||
load_type = static_cast<LoadType>(
|
load_type = LoadType::OpenProject;
|
||||||
std::clamp(std::stoi(wxGetApp().app_config->get("import_project_action")), static_cast<int>(LoadType::OpenProject), static_cast<int>(LoadType::LoadConfig)));
|
|
||||||
|
|
||||||
if (load_type == LoadType::Unknown) return false;
|
if (load_type == LoadType::Unknown) return false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue