mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-11 09:51:06 +00:00
Merge remote-tracking branch 'upstream/main'
# Conflicts: # src/libslic3r/Preset.cpp
This commit is contained in:
@@ -3267,6 +3267,15 @@ void MainFrame::init_menubar_as_editor()
|
||||
wxGetApp().open_preferences();
|
||||
},
|
||||
"", nullptr, []() { return true; }, this);
|
||||
|
||||
append_menu_item(
|
||||
m_topbar->GetTopMenu(), wxID_ANY, _L("Preset Bundle") + "\t", "",
|
||||
[this](wxCommandEvent &) {
|
||||
// Orca: Use GUI_App::open_preferences instead of direct call so windows associations are updated on exit
|
||||
wxGetApp().open_presetbundledialog();
|
||||
plater()->get_current_canvas3D()->force_set_focus();
|
||||
},
|
||||
"", nullptr, []() { return true; }, this);
|
||||
//m_topbar->AddDropDownMenuItem(preference_item);
|
||||
//m_topbar->AddDropDownMenuItem(printer_item);
|
||||
//m_topbar->AddDropDownMenuItem(language_item);
|
||||
@@ -3367,6 +3376,15 @@ void MainFrame::init_menubar_as_editor()
|
||||
{return m_plater->is_view3D_shown();; }, this);
|
||||
|
||||
#else
|
||||
// On Mac, the Apple menu ignores non-standard custom items, so add Preset Bundle to the File menu
|
||||
fileMenu->AppendSeparator();
|
||||
append_menu_item(
|
||||
fileMenu, wxID_ANY, _L("Preset Bundle"), "",
|
||||
[this](wxCommandEvent &) {
|
||||
wxGetApp().open_presetbundledialog();
|
||||
plater()->get_current_canvas3D()->force_set_focus();
|
||||
},
|
||||
"", nullptr, []() { return true; }, this);
|
||||
m_menubar->Append(fileMenu, wxString::Format("&%s", _L("File")));
|
||||
if (editMenu)
|
||||
m_menubar->Append(editMenu, wxString::Format("&%s", _L("Edit")));
|
||||
@@ -3669,7 +3687,7 @@ void MainFrame::load_config_file()
|
||||
// return;
|
||||
wxFileDialog dlg(this, _L("Select profile to load:"),
|
||||
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
|
||||
"config.json", "Config files (*.json;*.zip;*.orca_printer;*.orca_filament)|*.json;*.zip;*.orca_printer;*.orca_filament", wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST);
|
||||
"config.json", "Config files (*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament)|*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament", wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST);
|
||||
wxArrayString files;
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return;
|
||||
@@ -3686,11 +3704,16 @@ void MainFrame::load_config_file()
|
||||
int ids[]{wxID_NO, wxID_YES, wxID_NOTOALL, wxID_YESTOALL};
|
||||
return std::find(ids, ids + 4, res) - ids;
|
||||
},
|
||||
ForwardCompatibilitySubstitutionRule::Enable);
|
||||
ForwardCompatibilitySubstitutionRule::Enable,
|
||||
*wxGetApp().app_config);
|
||||
if (!cfiles.empty()) {
|
||||
wxGetApp().app_config->update_config_dir(get_dir_name(cfiles.back()));
|
||||
wxGetApp().load_current_presets();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " presets has been import,and size is" << cfiles.size();
|
||||
NetworkAgent* agent = wxGetApp().getAgent();
|
||||
if (agent) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " user is: " << agent->get_user_id();
|
||||
}
|
||||
}
|
||||
wxGetApp().preset_bundle->update_compatible(PresetSelectCompatibleType::Always);
|
||||
update_side_preset_ui();
|
||||
@@ -4237,7 +4260,7 @@ void MainFrame::update_side_preset_ui()
|
||||
void MainFrame::on_select_default_preset(SimpleEvent& evt)
|
||||
{
|
||||
MessageDialog dialog(this,
|
||||
_L("Do you want to synchronize your personal data from Bambu Cloud?\n"
|
||||
_L("Do you want to synchronize your personal data from Orca Cloud?\n"
|
||||
"It contains the following information:\n"
|
||||
"1. The Process presets\n"
|
||||
"2. The Filament presets\n"
|
||||
|
||||
Reference in New Issue
Block a user