mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Fixed conflicts after merge with master
This commit is contained in:
commit
ec9c3891cf
79 changed files with 3357 additions and 2245 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <exception>
|
||||
#include <cstdlib>
|
||||
#include <regex>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
@ -68,6 +69,7 @@
|
|||
#include "UnsavedChangesDialog.hpp"
|
||||
#include "SavePresetDialog.hpp"
|
||||
#include "PrintHostDialogs.hpp"
|
||||
#include "DesktopIntegrationDialog.hpp"
|
||||
|
||||
#include "BitmapCache.hpp"
|
||||
|
||||
|
@ -633,8 +635,17 @@ void GUI_App::post_init()
|
|||
//FIXME this is not strictly correct, as one may pass a print/filament/printer profile here instead of a full config.
|
||||
this->mainframe->load_config_file(this->init_params->load_configs.back());
|
||||
// If loading a 3MF file, the config is loaded from the last one.
|
||||
if (! this->init_params->input_files.empty())
|
||||
this->plater()->load_files(this->init_params->input_files, true, true);
|
||||
if (!this->init_params->input_files.empty()) {
|
||||
const std::vector<size_t> res = this->plater()->load_files(this->init_params->input_files, true, true);
|
||||
if (!res.empty() && this->init_params->input_files.size() == 1) {
|
||||
// Update application titlebar when opening a project file
|
||||
const std::string& filename = this->init_params->input_files.front();
|
||||
if (boost::algorithm::iends_with(filename, ".amf") ||
|
||||
boost::algorithm::iends_with(filename, ".amf.xml") ||
|
||||
boost::algorithm::iends_with(filename, ".3mf"))
|
||||
this->plater()->set_project_filename(filename);
|
||||
}
|
||||
}
|
||||
if (! this->init_params->extra_config.empty())
|
||||
this->mainframe->load_config(this->init_params->extra_config);
|
||||
}
|
||||
|
@ -1632,6 +1643,10 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
|||
local_menu->Append(config_id_base + ConfigMenuSnapshots, _L("&Configuration Snapshots") + dots, _L("Inspect / activate configuration snapshots"));
|
||||
local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _L("Take Configuration &Snapshot"), _L("Capture a configuration snapshot"));
|
||||
local_menu->Append(config_id_base + ConfigMenuUpdate, _L("Check for updates"), _L("Check for configuration updates"));
|
||||
#ifdef __linux__
|
||||
if (DesktopIntegrationDialog::integration_possible())
|
||||
local_menu->Append(config_id_base + ConfigMenuDesktopIntegration, _L("Desktop Integration"), _L("Desktop Integration"));
|
||||
#endif
|
||||
local_menu->AppendSeparator();
|
||||
}
|
||||
local_menu->Append(config_id_base + ConfigMenuPreferences, _L("&Preferences") + dots +
|
||||
|
@ -1672,6 +1687,11 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
|||
case ConfigMenuUpdate:
|
||||
check_updates(true);
|
||||
break;
|
||||
#ifdef __linux__
|
||||
case ConfigMenuDesktopIntegration:
|
||||
show_desktop_integration_dialog();
|
||||
break;
|
||||
#endif
|
||||
case ConfigMenuTakeSnapshot:
|
||||
// Take a configuration snapshot.
|
||||
#if ENABLE_PROJECT_DIRTY_STATE
|
||||
|
@ -2121,6 +2141,15 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
|
|||
return res;
|
||||
}
|
||||
|
||||
void GUI_App::show_desktop_integration_dialog()
|
||||
{
|
||||
#ifdef __linux__
|
||||
//wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
|
||||
DesktopIntegrationDialog dialog(mainframe);
|
||||
dialog.ShowModal();
|
||||
#endif //__linux__
|
||||
}
|
||||
|
||||
#if ENABLE_THUMBNAIL_GENERATOR_DEBUG
|
||||
void GUI_App::gcode_thumbnails_debug()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue