mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 15:35:55 +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_sla_selected = check_sla_selected();
|
||||||
any_fff_selected = !only_sla_mode && check_fff_selected();
|
any_fff_selected = !only_sla_mode && check_fff_selected();
|
||||||
|
|
||||||
check_and_install_missing_materials(T_ANY);
|
if(!only_sla_mode && !page_filaments)
|
||||||
update_materials(T_ANY);
|
|
||||||
if (page_filaments) {
|
|
||||||
if (any_fff_selected)
|
|
||||||
page_filaments->reload_presets();
|
|
||||||
}
|
|
||||||
else if(!only_sla_mode) {
|
|
||||||
add_page(page_filaments = new PageMaterials(q, &filaments,
|
add_page(page_filaments = new PageMaterials(q, &filaments,
|
||||||
_L("Filament Profiles Selection"), _L("Filaments"), _L("Type:")));
|
_L("Filament Profiles Selection"), _L("Filaments"), _L("Type:")));
|
||||||
}
|
if (!page_sla_materials)
|
||||||
|
|
||||||
if (page_sla_materials) {
|
|
||||||
if (any_sla_selected)
|
|
||||||
page_sla_materials->reload_presets();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
add_page(page_sla_materials = new PageMaterials(q, &sla_materials,
|
add_page(page_sla_materials = new PageMaterials(q, &sla_materials,
|
||||||
_L("SLA Material Profiles Selection") + " ", _L("SLA Materials"), _L("Type:")));
|
_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();
|
load_pages();
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "libslic3r/miniz_extension.hpp"
|
#include "libslic3r/miniz_extension.hpp"
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <boost/filesystem/fstream.hpp>
|
#include <boost/filesystem/fstream.hpp>
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
@ -4,15 +4,13 @@
|
|||||||
#include "Event.hpp"
|
#include "Event.hpp"
|
||||||
|
|
||||||
#include <boost/uuid/uuid_generators.hpp>
|
#include <boost/uuid/uuid_generators.hpp>
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace boost::filesystem {
|
|
||||||
class path;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
class AppConfig;
|
class AppConfig;
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define slic3r_TopBarMenus_hpp_
|
#define slic3r_TopBarMenus_hpp_
|
||||||
|
|
||||||
#include <wx/menu.h>
|
#include <wx/menu.h>
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
class TopBarItemsCtrl;
|
class TopBarItemsCtrl;
|
||||||
class wxString;
|
class wxString;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "format.hpp"
|
#include "format.hpp"
|
||||||
|
|
||||||
#include "Widgets/CheckBox.hpp"
|
#include "Widgets/CheckBox.hpp"
|
||||||
|
#include <wx/wupdlock.h>
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
@ -177,7 +178,7 @@ void RepositoryUpdateUIManager::fill_grids()
|
|||||||
{
|
{
|
||||||
ScalableButton* btn = new ScalableButton(m_parent, wxID_ANY, "open");
|
ScalableButton* btn = new ScalableButton(m_parent, wxID_ANY, "open");
|
||||||
btn->SetToolTip(_L("Open folder"));
|
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());
|
GUI::desktop_open_folder(entry.source_path.parent_path().make_preferred());
|
||||||
});
|
});
|
||||||
add(btn);
|
add(btn);
|
||||||
@ -293,8 +294,8 @@ bool RepositoryUpdateUIManager::set_selected_repositories()
|
|||||||
void RepositoryUpdateUIManager::check_selection()
|
void RepositoryUpdateUIManager::check_selection()
|
||||||
{
|
{
|
||||||
for (const auto& [uuid, is_selected] : m_pad->get_selected_repositories_uuid() )
|
for (const auto& [uuid, is_selected] : m_pad->get_selected_repositories_uuid() )
|
||||||
if (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()) {
|
(!is_selected && m_selected_uuids.find(uuid) != m_selected_uuids.end())) {
|
||||||
m_is_selection_changed = true;
|
m_is_selection_changed = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
#define slic3r_GUI_UpdatesUIManager_hpp_
|
#define slic3r_GUI_UpdatesUIManager_hpp_
|
||||||
|
|
||||||
#include "GUI_Utils.hpp"
|
#include "GUI_Utils.hpp"
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <set>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
class wxEvent;
|
class wxEvent;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user