mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 07:36:00 +08:00
ConfigWizard: Fixed a crash on start, when for some of printers wasn't set selected material
+ Added missed includes and fixed some of warnings
This commit is contained in:
parent
e7e9b8c7a1
commit
caa437773a
@ -3881,25 +3881,20 @@ void ConfigWizard::priv::load_pages_from_archive()
|
||||
any_sla_selected = check_sla_selected();
|
||||
any_fff_selected = !only_sla_mode && check_fff_selected();
|
||||
|
||||
check_and_install_missing_materials(T_ANY);
|
||||
update_materials(T_ANY);
|
||||
if (page_filaments) {
|
||||
if (any_fff_selected)
|
||||
page_filaments->reload_presets();
|
||||
}
|
||||
else if(!only_sla_mode) {
|
||||
if(!only_sla_mode && !page_filaments)
|
||||
add_page(page_filaments = new PageMaterials(q, &filaments,
|
||||
_L("Filament Profiles Selection"), _L("Filaments"), _L("Type:")));
|
||||
}
|
||||
|
||||
if (page_sla_materials) {
|
||||
if (any_sla_selected)
|
||||
page_sla_materials->reload_presets();
|
||||
}
|
||||
else {
|
||||
if (!page_sla_materials)
|
||||
add_page(page_sla_materials = new PageMaterials(q, &sla_materials,
|
||||
_L("SLA Material Profiles Selection") + " ", _L("SLA Materials"), _L("Type:")));
|
||||
}
|
||||
|
||||
check_and_install_missing_materials(T_ANY);
|
||||
update_materials(T_ANY);
|
||||
if (any_fff_selected)
|
||||
page_filaments->reload_presets();
|
||||
|
||||
if (any_sla_selected)
|
||||
page_sla_materials->reload_presets();
|
||||
|
||||
load_pages();
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "libslic3r/miniz_extension.hpp"
|
||||
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
|
@ -4,15 +4,13 @@
|
||||
#include "Event.hpp"
|
||||
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace boost::filesystem {
|
||||
class path;
|
||||
}
|
||||
|
||||
namespace Slic3r {
|
||||
class AppConfig;
|
||||
namespace GUI {
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define slic3r_TopBarMenus_hpp_
|
||||
|
||||
#include <wx/menu.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
class TopBarItemsCtrl;
|
||||
class wxString;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "format.hpp"
|
||||
|
||||
#include "Widgets/CheckBox.hpp"
|
||||
#include <wx/wupdlock.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@ -177,7 +178,7 @@ void RepositoryUpdateUIManager::fill_grids()
|
||||
{
|
||||
ScalableButton* btn = new ScalableButton(m_parent, wxID_ANY, "open");
|
||||
btn->SetToolTip(_L("Open folder"));
|
||||
btn->Bind(wxEVT_BUTTON, [this, &entry](wxCommandEvent& event) {
|
||||
btn->Bind(wxEVT_BUTTON, [&entry](wxCommandEvent& event) {
|
||||
GUI::desktop_open_folder(entry.source_path.parent_path().make_preferred());
|
||||
});
|
||||
add(btn);
|
||||
@ -293,8 +294,8 @@ bool RepositoryUpdateUIManager::set_selected_repositories()
|
||||
void RepositoryUpdateUIManager::check_selection()
|
||||
{
|
||||
for (const auto& [uuid, is_selected] : m_pad->get_selected_repositories_uuid() )
|
||||
if (is_selected && m_selected_uuids.find(uuid) == m_selected_uuids.end() ||
|
||||
!is_selected && m_selected_uuids.find(uuid) != m_selected_uuids.end()) {
|
||||
if ((is_selected && m_selected_uuids.find(uuid) == m_selected_uuids.end() )||
|
||||
(!is_selected && m_selected_uuids.find(uuid) != m_selected_uuids.end())) {
|
||||
m_is_selection_changed = true;
|
||||
return;
|
||||
}
|
||||
|
@ -4,6 +4,9 @@
|
||||
#define slic3r_GUI_UpdatesUIManager_hpp_
|
||||
|
||||
#include "GUI_Utils.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
class wxWindow;
|
||||
class wxEvent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user