Compare commits

..
Author SHA1 Message Date
Rodrigo Faselli 3baacc6b75 Add memory header to GUI_Factories.cpp 2026-10-06 10:25:49 -03:00
Rodrigo Faselli 1a0af2fe57 Merge branch 'main' into fix/gui-resource-leaks 2026-10-06 10:18:20 -03:00
ExPikaPaka c017629d11 Release GL textures, menus and handlers the GUI was leaking
The filament legend held its texture id in a function local static while the
loader it calls generates a new texture every time, and BitmapCache deletes none,
so a dual nozzle printer leaked one texture per filament per frame while the
preview was open, along with an SVG read and a rasterize per frame. The same
pattern sat in menu_item_with_icon. Textures are now cached on what actually
varies and released with the rest of the ImGui resources. The canvas reuses
frames by hashing the draw commands, which include the texture id, so a fresh id
every frame also kept frame skipping from ever triggering.

TriangleSelectorPatch did not release its VAO and buffers in the destructor,
so every gizmo close leaked them. The base class already issues GL deletes on
that same path, so this adds no new context requirement.

bind_event_handlers() installed three lambdas that unbind_event_handlers() could
not remove, because wx matches handlers by functor address. They are member
functions now, so bind and unbind are symmetric, and the view switch stops
stacking handlers.

The five selection dependent menus were allocated with new on every popup and
never owned. PopupMenu is synchronous and none of them is used as a submenu, so
a single owner is enough.

remove_notification_of_type stopped at the first match, so clear_all() left the
later instances of multi-instance types alive with object ids from a project that
is gone. The measure gizmo cleared its raycaster map but not the map holding one
full mesh decomposition per volume.
2026-10-01 09:15:48 +02:00
104 changed files with 294 additions and 258 deletions
+7 -5
View File
@@ -23,6 +23,7 @@
#include <map>
#include <vector>
#include "libslic3r/PrintBase.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <cerrno>
#include <utility>
@@ -77,10 +78,12 @@
#include <condition_variable>
#include <mutex>
#include <boost/thread.hpp>
#endif
//add json logic
#include "nlohmann/json.hpp"
using namespace nlohmann;
#endif
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/nowide/args.hpp>
@@ -154,7 +157,6 @@
#include <stdio.h>
namespace fs = boost::filesystem;
using json = nlohmann::json;
#ifdef __WXGTK__
#if __has_include(<X11/Xlib.h>)
@@ -3522,7 +3524,7 @@ int CLI::run(int argc, char **argv)
ConfigOptionStrings *curr_variant_opt = m_print_config.option<ConfigOptionStrings>("filament_extruder_variant");
if (!curr_variant_opt) {
curr_variant_opt = m_print_config.option<ConfigOptionStrings>("filament_extruder_variant", true);
std::vector<std::string>& filament_variants = curr_variant_opt->values;
std::vector<string>& filament_variants = curr_variant_opt->values;
filament_variants.resize(filament_count, get_extruder_variant_string(etDirectDrive, nvtStandard));
}
const ConfigOptionStrings *new_variant_opt = dynamic_cast<const ConfigOptionStrings*>(config.option("filament_extruder_variant", true));
@@ -6552,7 +6554,7 @@ int CLI::run(int argc, char **argv)
std::vector<int> result_filaments;
//result_filaments.reserve(conflict_filaments.size());
std::set_intersection(conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(),
unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
unprintable_filament_vec[index].end(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
conflict_filament_vector = result_filaments;
}
}
+2
View File
@@ -15,6 +15,8 @@
#include "libslic3r/Semver.hpp"
#include "calib.hpp"
using namespace nlohmann;
#define ENV_DEV_HOST "0"
#define ENV_QAT_HOST "1"
#define ENV_PRE_HOST "2"
-10
View File
@@ -352,16 +352,6 @@ void FillSpiralInset::_fill_surface_single(const FillParams& params,
assert(params.use_arachne);
assert(this->print_config != nullptr && this->print_object_config != nullptr);
// Internal solid infill must not add Arachne's standalone thin walls: one of those walls can
// become the extra centre point after the spiral has finished. Top and bottom surfaces keep
// Arachne, including the centre plug handled by generate_spiral_insets().
if (params.extrusion_role == erSolidInfill) {
Polylines polylines;
this->_fill_surface_single(params, thickness_layers, direction, expolygon, polylines);
append(thick_polylines_out, to_thick_polylines(std::move(polylines), scaled<coord_t>(this->spacing)));
return;
}
// Only a solid surface is worth the variable width walls; a sparse one falls back to plain loops.
if (params.density <= 0.9999f || params.dont_adjust) {
Polylines polylines;
-1
View File
@@ -87,7 +87,6 @@
#include "libslic3r/GCode/Thumbnails.hpp"
namespace fs = boost::filesystem;
using json = nlohmann::json;
using boost::property_tree::ptree;
-2
View File
@@ -87,8 +87,6 @@
// This breaks compatibility with the upstream Slic3r if the --datadir is used to switch between the two versions.
//#define SLIC3R_PROFILE_USE_PRESETS_SUBDIR
using json = nlohmann::json;
namespace Slic3r {
// Project-level options imported from a loaded 3MF into project_config. s_project_options_published
+1 -1
View File
@@ -1580,7 +1580,7 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo
{
std::vector<int> result_filaments;
//result_filaments.reserve(conflict_filaments.size());
std::set_intersection (conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(), unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
std::set_intersection (conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(), unprintable_filament_vec[index].end(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
conflict_filament_vector = result_filaments;
}
}
-1
View File
@@ -69,7 +69,6 @@
#include <wx/dcmemory.h>
namespace fs = boost::filesystem;
using json = nlohmann::json;
namespace Slic3r { namespace GUI {
+2 -2
View File
@@ -11,7 +11,7 @@
#include "slic3r/GUI/Widgets/Button.hpp"
#include "slic3r/GUI/Widgets/ComboBox.hpp"
#include <string>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <wx/notebook.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
@@ -246,7 +246,7 @@ public:
void create_folder(wxString name = wxEmptyString);
std::string replaceSpace(std::string s, std::string ts, std::string ns);
void on_import_file(wxCommandEvent &event);
void Reload(wxString aux_path, std::map<std::string, std::vector<nlohmann::json>> paths);
void Reload(wxString aux_path, std::map<std::string, std::vector<json>> paths);
void update_all_panel();
void update_all_cover();
+1 -3
View File
@@ -26,7 +26,7 @@
#include <memory>
#include "slic3r/GUI/BBLStatusBarBind.hpp"
#include "slic3r/GUI/Jobs/BindJob.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "slic3r/GUI/Jobs/Worker.hpp"
#include <utility>
@@ -54,8 +54,6 @@
#include "DeviceCore/DevManager.h"
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+2
View File
@@ -58,6 +58,8 @@ public:
static bool parse_color(const std::string& scolor, unsigned char* rgb_out);
static bool parse_color4(const std::string& scolor, unsigned char* rgba_out);
// Rasterizes the SVG into a freshly generated GL texture; the caller owns it and has to delete
// it (ImGuiWrapper::svg_texture() caches the result for the whole session).
static bool load_from_svg_file_change_color(const std::string &filename, unsigned width, unsigned height, ImTextureID &texture_id, const char *hexColor);
+1 -3
View File
@@ -25,7 +25,7 @@
#include "slic3r/GUI/Widgets/RadioBox.hpp"
#include <cstdio>
#include <map>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <cstdlib>
#include "slic3r/GUI/GUI_Utils.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
@@ -91,8 +91,6 @@
#define SELECT_ALL_OPTION_COLOUR wxColour("#009688")
#define DEFAULT_PROMPT_TEXT_COLOUR wxColour("#ACACAC")
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -3
View File
@@ -1,12 +1,10 @@
#include "DevAxis.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/DeviceCore/DevDefs.h"
using json = nlohmann::json;
namespace Slic3r
{
+2 -1
View File
@@ -2,6 +2,7 @@
#include <memory>
#include <nlohmann/json.hpp>
#include <string>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -21,7 +22,7 @@ public:
bool IsArchCoreXY() const;
public:
void ParseAxis(const nlohmann::json &print_json);
void ParseAxis(const json &print_json);
int Ctrl_GoHome();
int Ctrl_Axis(std::string axis, double unit = 1.0f, double input_val = 1.0f, int speed = 3000); // xyz e
+1 -3
View File
@@ -1,13 +1,11 @@
#include "DevAxis.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include <cstdlib>
#include <cstdio>
using json = nlohmann::json;
namespace Slic3r
{
+1 -3
View File
@@ -1,9 +1,7 @@
#include "DevBed.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r {
void DevBed::ParseV1_0(const json &print_json, DevBed *system)
+3 -2
View File
@@ -1,5 +1,6 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -15,8 +16,8 @@ public:
public:
static void ParseV1_0(const nlohmann::json &print_json, DevBed *system);
static void ParseV2_0(const nlohmann::json &print_json, DevBed *system);
static void ParseV1_0(const json &print_json, DevBed *system);
static void ParseV2_0(const json &print_json, DevBed *system);
private:
+1 -3
View File
@@ -1,6 +1,6 @@
#include <algorithm>
#include <boost/log/trivial.hpp>
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
@@ -22,8 +22,6 @@
#include "DevFilaSystem.h"
#include "DevConfig.h"
using json = nlohmann::json;
namespace Slic3r {
static float string_to_float(const std::string &str_value)
+8 -7
View File
@@ -2,6 +2,7 @@
#include <nlohmann/json.hpp>
#include <optional>
#include <vector>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
@@ -85,11 +86,11 @@ public:
std::vector<FlowRatioCalibResult> GetFlowRatioResult() const {return m_flow_ratio_results; }
protected:
void ExtrusionCalibSetParse(const nlohmann::json &jj);
void ExtrusionCalibSelectParse(const nlohmann::json &jj);
void ExtrusionCalibGetTableParse(const nlohmann::json &jj);
void ExtrusionCalibGetResultParse(const nlohmann::json &jj);
void FlowrateGetResultParse(const nlohmann::json &jj);
void ExtrusionCalibSetParse(const json &jj);
void ExtrusionCalibSelectParse(const json &jj);
void ExtrusionCalibGetTableParse(const json &jj);
void ExtrusionCalibGetResultParse(const json &jj);
void FlowrateGetResultParse(const json &jj);
private:
MachineObject* m_owner{nullptr};
@@ -118,11 +119,11 @@ private:
bool m_calib_finished{false};
public:
static void ParseCalibVersion(const nlohmann::json& j, DevCalib* system);
static void ParseCalibVersion(const json& j, DevCalib* system);
static void ParseSupportNewAutoCalib(int flag, DevCalib* system);
static void ParseV1_0(const nlohmann::json& print_json, DevCalib* system, bool key_field_only);
static void ParseV1_0(const json& print_json, DevCalib* system, bool key_field_only);
};
} // namespace Slic3r
+1 -3
View File
@@ -3,11 +3,9 @@
#include "DevConfig.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r {
bool DevChamber::HasChamber() const { return m_owner->GetConfig()->HasChamber(); }
+4 -3
View File
@@ -1,6 +1,7 @@
#pragma once
#include <memory>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -24,10 +25,10 @@ public: // getter
public:
// setter
void ParseChamber(const nlohmann::json &print_json);
void ParseChamber(const json &print_json);
void ParseChamberV1_0(const nlohmann::json& print_json);
void ParseChamberV2_0(const nlohmann::json& print_json);
void ParseChamberV1_0(const json& print_json);
void ParseChamberV2_0(const json& print_json);
// control
int CtrlSetChamberTemp(int temp);
+1 -3
View File
@@ -1,10 +1,8 @@
#include "DevChamber.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
using json = nlohmann::json;
namespace Slic3r {
int DevChamber::CtrlSetChamberTemp(int temp)
+1
View File
@@ -2,6 +2,7 @@
#include "DevConfig.h"
#include "DevUtil.h"
#include "json_diff.hpp"
using namespace nlohmann;
+5 -5
View File
@@ -1,7 +1,7 @@
#pragma once
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <wx/string.h>
#include <limits>
@@ -47,11 +47,11 @@ public:
public:
/*Setters*/
void ParseConfig(const nlohmann::json& print_json);
void ParseConfig(const json& print_json);
void ParseChamberConfig(const nlohmann::json& print_json); // chamber
void ParsePrintOptionsConfig(const nlohmann::json& print_json); // print options
void ParseCalibrationConfig(const nlohmann::json& print_json); //cali
void ParseChamberConfig(const json& print_json); // chamber
void ParsePrintOptionsConfig(const json& print_json); // print options
void ParseCalibrationConfig(const json& print_json); //cali
private:
[[maybe_unused]] MachineObject* m_obj;
+1 -1
View File
@@ -1,6 +1,6 @@
#include "DevConfigUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
+1
View File
@@ -4,6 +4,7 @@
#include "DevCtrl.h"
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+3 -3
View File
@@ -1,6 +1,6 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <string>
#include <ctime>
#include <wx/string.h>
@@ -15,7 +15,7 @@ class DevCtrlInfo
{
public:
DevCtrlInfo() {};
DevCtrlInfo(MachineObject* obj, int sequence_id, const nlohmann::json& req_json, int interval_max = 3, int interval_min = 0);
DevCtrlInfo(MachineObject* obj, int sequence_id, const json& req_json, int interval_max = 3, int interval_min = 0);
public:
bool CheckCanUpdateData(const nlohmann::json& jj);
@@ -32,7 +32,7 @@ private:
time_t m_request_time = 0;
int m_request_seq = 0;
nlohmann::json m_request_json = nlohmann::json();
json m_request_json = json();
// check
int m_request_interval_max = 3;
+1 -1
View File
@@ -3,7 +3,7 @@
#include <optional>
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <wx/string.h>
#include "DevDefs.h"
@@ -15,6 +15,7 @@
#include "DevFilaSystem.h" // complete type for GetFilaSystem()->GetTrayIndexMap() in GetBackupAmsSlotInGroup
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -5,7 +5,7 @@
#include <unordered_map>
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <vector>
#include <wx/string.h>
+1
View File
@@ -6,6 +6,7 @@
#include <string>
#include <vector>
#include <wx/app.h>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+6 -5
View File
@@ -2,6 +2,7 @@
#include <functional>
#include <cstdint>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <map>
#include <vector>
@@ -12,7 +13,7 @@ namespace Slic3r {
class MachineObject;
enum AirDuctType { AIR_FAN_TYPE, AIR_DOOR_TYPE };
typedef std::function<void(const nlohmann::json &)> CommandCallBack;
typedef std::function<void(const json &)> CommandCallBack;
enum AIR_FUN : int {
FAN_HEAT_BREAK_0_IDX = 0,
@@ -122,14 +123,14 @@ public:
AirDuctData GetAirDuctData() { return m_air_duct_data; };
void converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun); // Convert the data to duct type to make the newand old protocols consistent
int command_handle_response(const nlohmann::json &response);
int command_handle_response(const json &response);
int command_control_fan(int fan_type, int val); // Old protocol
int command_control_fan_new(int fan_id, int val); // New protocol
int command_control_air_duct(int mode_id, int submode, const CommandCallBack& cb);
void ParseV1_0(const nlohmann::json &print_json);
void ParseV2_0(const nlohmann::json &print_json);
void ParseV3_0(const nlohmann::json &print_json);
void ParseV1_0(const json &print_json);
void ParseV2_0(const json &print_json);
void ParseV3_0(const json &print_json);
public:
bool GetSupportAirduct() { return is_support_airduct; };
@@ -1,13 +1,11 @@
#include "DevFilaAmsSetting.h"
#include "DevFilaSystem.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include "slic3r/GUI/DeviceCore/DevCtrl.h"
using json = nlohmann::json;
namespace Slic3r {
int DevAmsSystemFirmwareSwitch::CrtlSwitchFirmware(int firmware_idx)
{
@@ -14,6 +14,7 @@
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "DevFilaBlackList.h"
#include "json_diff.hpp"
#include "slic3r/Utils/NetworkAgent.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "DevFilaSystem.h"
+2 -2
View File
@@ -5,7 +5,7 @@
#include <string>
#include <vector>
#include <wx/string.h>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r
{
@@ -67,7 +67,7 @@ public:
static CheckResult check_filaments_in_blacklist(const CheckFilamentInfo& info);
public:
static nlohmann::json filaments_blacklist;
static json filaments_blacklist;
};// class DevFilaBlacklist
}// namespace Slic3r
@@ -18,6 +18,7 @@
#include <set>
#include <utility>
#include "DevFilaSystem.h"
#include "json_diff.hpp"
#include "slic3r/Utils/NetworkAgent.hpp"
#include "DevNozzleSystem.h" // DevNozzle / DevNozzleSystem for GetNozzleFlowStringByAmsId
+3 -3
View File
@@ -1,6 +1,6 @@
#pragma once
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
#include "DevFilaAmsSetting.h"
@@ -415,9 +415,9 @@ private:
class DevFilaSystemParser
{
public:
static void ParseV1_0(const nlohmann::json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
static void ParseV1_0(const json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
static void ParseAgentFilament(const nlohmann::json& data, MachineObject* obj, DevFilaSystem* system);
static void ParseAgentFilament(const json& data, MachineObject* obj, DevFilaSystem* system);
};
struct DevFilamentDryingPreset
@@ -2,6 +2,7 @@
#include <string>
#include "DevFilaSystem.h"
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"// TODO: remove this include
using namespace nlohmann;
+5 -3
View File
@@ -1,9 +1,11 @@
#pragma once
#include "DevFirmware.h"
#include "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include <string>
#include <wx/string.h>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -49,10 +51,10 @@ public:
bool isCuttingModule() const { return product_name.Contains("Cutting Module"); }
bool isRotary() const { return product_name.Contains("Rotary"); }// Rotary Attachment
bool isExtinguishSystem() const { return product_name.Contains("Extinguishing System"); }// Auto Fire Extinguishing System
bool isWTM() const { return name.find("wtm") != std::string::npos; } // nozzle
bool isWTM() const { return name.find("wtm") != string::npos; } // nozzle
bool isExhaustFan() const { return product_name.Contains("Exhaust Fan"); }
bool isHmshub() const { return product_name.find("Filament Buffer") != std::string::npos; }
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != std::string::npos; }
bool isHmshub() const { return product_name.find("Filament Buffer") != string::npos; }
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != string::npos; }
};
+1 -3
View File
@@ -2,12 +2,10 @@
#include "DevHMS.h"
#include <string>
#include <cstdio>
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include <exception>
#include <cassert>
using json = nlohmann::json;
namespace Slic3r
{
+3 -3
View File
@@ -1,6 +1,6 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <vector>
#include <string>
#include <wx/string.h>
@@ -18,7 +18,7 @@ public:
DevHMS(MachineObject* obj) : m_object(obj) {}
public:
void ParseHMSItems(const nlohmann::json& hms_json);
void ParseHMSItems(const json& hms_json);
const std::vector<DevHMSItem>& GetHMSItems() const { return m_hms_list; };
private:
@@ -69,7 +69,7 @@ public:
bool has_read() const { return m_already_read; };
protected:
friend void DevHMS::ParseHMSItems(const nlohmann::json& hms_json);
friend void DevHMS::ParseHMSItems(const json& hms_json);
bool parse_hms_info(unsigned attr, unsigned code);
private:
@@ -3,6 +3,7 @@
#include "DevLamp.h"
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+1
View File
@@ -23,6 +23,7 @@
#include "DevUtil.h"
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/GUI_App.hpp"
+1
View File
@@ -3,6 +3,7 @@
#include <mutex>
#include "libslic3r/CommonDefs.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <string>
#include <vector>
#include <wx/object.h>
@@ -6,6 +6,7 @@
#include "DevUtil.h"
#include "DevUtilBackend.h"
#include "json_diff.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include "libslic3r/CommonDefs.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include "DevNozzleSystem.h"
#include "DevFirmware.h"
@@ -1,7 +1,7 @@
#include "DevNozzleRack.h"
#include "DevExtruderSystem.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/MsgDialog.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -14,8 +14,6 @@
#include "slic3r/GUI/DeviceCore/DevNozzleSystem.h"
using json = nlohmann::json;
namespace Slic3r
{
@@ -4,7 +4,7 @@
#include "DevNozzleSystem.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -28,8 +28,6 @@
#include <optional>
#include <cmath>
using json = nlohmann::json;
namespace Slic3r
{
+2 -2
View File
@@ -4,7 +4,7 @@
#include "libslic3r/CommonDefs.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include "libslic3r/PrintConfig.hpp"
#include <string>
@@ -195,6 +195,6 @@ namespace Slic3r
{
public:
static void ParseV1_0(const nlohmann::json& nozzletype_json, const nlohmann::json& diameter_json, DevNozzleSystem* system, std::optional<int> flag_e3d);
static void ParseV2_0(const nlohmann::json& device_json, DevNozzleSystem* system);
static void ParseV2_0(const json& device_json, DevNozzleSystem* system);
};
};
@@ -8,11 +8,9 @@
#include <ctime>
#include <exception>
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r
{
+1 -3
View File
@@ -1,10 +1,8 @@
#include "DevStorage.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include <string>
using json = nlohmann::json;
namespace Slic3r {
DevStorage::SdcardState Slic3r::DevStorage::set_sdcard_state(int state)
+2 -1
View File
@@ -1,6 +1,7 @@
#pragma once
#include <nlohmann/json.hpp>
#include <string>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -26,7 +27,7 @@ public:
SdcardState get_sdcard_state() const { return m_sdcard_state; };
SdcardState set_sdcard_state(int state);
static void ParseV1_0(const nlohmann::json &print_json, DevStorage *system);
static void ParseV1_0(const json &print_json, DevStorage *system);
bool is_timelapse_storage_low(const std::string& storage) const;
+1 -3
View File
@@ -1,7 +1,7 @@
#include "DevUpgrade.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/GUI_App.hpp"
@@ -13,8 +13,6 @@
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include <wx/string.h>
using json = nlohmann::json;
namespace Slic3r {
int DevUpgrade::GetUpgradeProgressInt() const
+4 -3
View File
@@ -4,6 +4,7 @@
#include <nlohmann/json.hpp>
#include <string>
#include <wx/string.h>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
#include "DevFirmware.h"
@@ -46,8 +47,8 @@ public:
int CtrlUpgradeModule(std::string url, std::string module_type, std::string version);
// parser
void ParseUpgrade_V1_0(const nlohmann::json &print_jj);
void ParseUpgradeDisplayState(const nlohmann::json &upgrade_state_jj);
void ParseUpgrade_V1_0(const json &print_jj);
void ParseUpgradeDisplayState(const json &upgrade_state_jj);
protected:
DevUpgrade(MachineObject *owner) : m_owner(owner) {}
@@ -89,7 +90,7 @@ public:
public:
int CtrlGetVersion(bool with_retry = true);
void ParseGetVersion(const nlohmann::json &print_jj);
void ParseGetVersion(const json &print_jj);
private:
MachineObject *m_owner;
+1 -3
View File
@@ -1,12 +1,10 @@
#include "DevUpgrade.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include "slic3r/GUI/DeviceCore/DevFirmware.h"
using json = nlohmann::json;
namespace Slic3r {
int DevUpgrade::CtrlUpgradeConfirm()
+1 -3
View File
@@ -1,5 +1,5 @@
#include "PrinterNetworkTypes.hpp"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "DeviceManager.hpp"
#include "HMS.hpp"
#include "I18N.hpp"
@@ -105,8 +105,6 @@
#include "libslic3r/PresetBundle.hpp"
#include "slic3r/GUI/Jobs/SendJob.hpp"
using json = nlohmann::json;
class wxWindow;
namespace fs = boost::filesystem;
+10 -9
View File
@@ -63,6 +63,7 @@
#define END_SEQ_ID 30000
#define SUBSCRIBE_RETRY_COUNT 5
using namespace nlohmann;
namespace Slic3r {
namespace GUI
@@ -466,7 +467,7 @@ public:
std::string get_print_error_str() const { return MachineObject::get_error_code_str(this->print_error); }
std::unordered_set<GUI::DeviceErrorDialog*> m_command_error_code_dlgs;
void add_command_error_code_dlg(int command_err, nlohmann::json action_json=nlohmann::json{});
void add_command_error_code_dlg(int command_err, json action_json=json{});
int curr_layer = 0;
int total_layers = 0;
@@ -758,9 +759,9 @@ public:
int command_set_printer_nozzle2(int id, std::string nozzle_type, float diameter);
int command_get_access_code();
int command_start_camera();
int command_ack_proceed(nlohmann::json& proceed);
int command_ack_proceed(json& proceed);
int command_purification_disable();
int command_dont_remind_next_time(nlohmann::json& mqtt_guard_json);
int command_dont_remind_next_time(json& mqtt_guard_json);
/* command upgrade */
int command_upgrade_confirm();
@@ -886,7 +887,7 @@ public:
static bool is_in_printing_status(std::string status);
void set_print_state(std::string status);
void update_print_progress(const nlohmann::json& value);
void update_print_progress(const json& value);
bool is_connected();
bool is_connecting();
@@ -902,7 +903,7 @@ public:
/* Msg for display MsgFn */
typedef std::function<void(std::string topic, std::string payload)> MsgFn;
int publish_json(const nlohmann::json& json_item, int qos = 0, int flag = 0) ;
int publish_json(const json& json_item, int qos = 0, int flag = 0) ;
int publish_json(const std::string& json_str, int qos = 0, int flag = 0) = delete;
int cloud_publish_json(std::string json_str, int qos = 0, int flag = 0);
int local_publish_json(std::string json_str, int qos = 0, int flag = 0);
@@ -946,16 +947,16 @@ public:
* or scenarios where users want to bypass the AMS.
*/
std::vector<DevAmsTray> vt_slot;
DevAmsTray parse_vt_tray(nlohmann::json vtray);
DevAmsTray parse_vt_tray(json vtray);
/*get ams slot info*/
bool contains_tray(const std::string &ams_id, const std::string &tray_id) const;
DevAmsTray get_tray(const std::string &ams_id, const std::string &tray_id) const;/*use contains_tray() check first*/
/*for parse new info*/
bool check_enable_np(const nlohmann::json& print) const;
void parse_new_info(nlohmann::json print);
void parse_new_info2(const nlohmann::json& info);
bool check_enable_np(const json& print) const;
void parse_new_info(json print);
void parse_new_info2(const json& info);
int get_flag_bits(std::string str, int start, int count = 1) const;
uint32_t get_flag_bits_no_border(std::string str, int start_idx, int count = 1) const;
int get_flag_bits(int num, int start, int count = 1, int base = 10) const;
+1 -1
View File
@@ -67,7 +67,7 @@ public:
void on_script_message(const nlohmann::json& payload) override;
void OnRequestPresets();
void OnExportData(const wxString& path, const wxString& name, nlohmann::json data);
void OnExportData(const wxString& path, const wxString& name, json data);
protected:
bool m_seq_top_layer_only_changed{false};
+7 -7
View File
@@ -2816,7 +2816,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
}
return ret;
};
auto calculate_offsets = [max_width, window_padding](const std::vector<std::pair<std::string, std::vector<std::string>>>& title_columns, float extra_size = 0.0f) {
auto calculate_offsets = [max_width, window_padding](const std::vector<std::pair<std::string, std::vector<::string>>>& title_columns, float extra_size = 0.0f) {
const ImGuiStyle& style = ImGui::GetStyle();
std::vector<float> offsets;
offsets.push_back(max_width(title_columns[0].second, title_columns[0].first, extra_size) + 3.0f * style.ItemSpacing.x + style.WindowPadding.x);
@@ -2963,7 +2963,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
}
::sprintf(buff, "%.2f", longest_str);
std::vector<std::pair<std::string, std::vector<std::string>>> title_columns;
std::vector<std::pair<std::string, std::vector<::string>>> title_columns;
if (displayed_columns & ColumnData::Model) {
title_columns.push_back({ _u8L("Filament"), {""} });
title_columns.push_back({ _u8L("Model"), {buff} });
@@ -3184,7 +3184,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
float ams_item_height = 0;
float filament_group_item_align_width = 0;
{
float three_words_width = imgui.calc_text_size(std::string_view("ABC")).x;
float three_words_width = imgui.calc_text_size("ABC"sv).x;
const int line_capacity = 4;
for (const auto& extruder_filaments : {m_left_extruder_filament,m_right_extruder_filament })
@@ -3195,8 +3195,8 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
for (int j = idx; j < extruder_filaments.size() && j < idx + line_capacity; ++j) {
auto text_info = imgui.calculate_filament_group_text_size(get_filament_display_type(extruder_filaments[j]));
auto text_size = std::get<0>(text_info);
filament_group_item_align_width = std::max(filament_group_item_align_width, text_size.x);
text_line_height = std::max(text_line_height, text_size.y);
filament_group_item_align_width = max(filament_group_item_align_width, text_size.x);
text_line_height = max(text_line_height, text_size.y);
}
container_height += (three_words_width * 1.3f + text_line_height );
}
@@ -3589,7 +3589,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
return ret;
};
auto calculate_offsets = [max_width, this](const std::vector<std::pair<std::string, std::vector<std::string>>>& title_columns, float extra_size = 0.0f) {
auto calculate_offsets = [max_width, this](const std::vector<std::pair<std::string, std::vector<::string>>>& title_columns, float extra_size = 0.0f) {
const ImGuiStyle& style = ImGui::GetStyle();
std::vector<float> offsets;
// ORCA increase spacing for more readable format. Using direct number requires much less code change in here. GetTextLineHeight for additional spacing for icon_size
@@ -4014,7 +4014,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
total_filaments.push_back(buffer);
std::vector<std::pair<std::string, std::vector<std::string>>> title_columns;
std::vector<std::pair<std::string, std::vector<::string>>> title_columns;
if (displayed_columns & ColumnData::Model) {
title_columns.push_back({ _u8L("Filament"), {""} });
title_columns.push_back({ _u8L("Model"), total_filaments });
+28 -18
View File
@@ -3416,7 +3416,8 @@ void GLCanvas3D::load_sla_preview()
void GLCanvas3D::bind_event_handlers()
{
if (m_canvas != nullptr) {
// Every view switch binds, so binding twice would run each handler twice per event.
if (m_canvas != nullptr && !m_event_handlers_bound) {
m_canvas->Bind(wxEVT_SIZE, &GLCanvas3D::on_size, this);
m_canvas->Bind(wxEVT_IDLE, &GLCanvas3D::on_idle, this);
m_canvas->Bind(wxEVT_CHAR, &GLCanvas3D::on_char, this);
@@ -3426,9 +3427,9 @@ void GLCanvas3D::bind_event_handlers()
m_canvas->Bind(wxEVT_TIMER, &GLCanvas3D::on_timer, this);
m_canvas->Bind(EVT_GLCANVAS_RENDER_TIMER, &GLCanvas3D::on_render_timer, this);
m_toolbar_highlighter.set_timer_owner(m_canvas, 0);
m_canvas->Bind(EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, [this](wxTimerEvent&) { m_toolbar_highlighter.blink(); });
m_canvas->Bind(EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, &GLCanvas3D::on_toolbar_highlighter_timer, this);
m_gizmo_highlighter.set_timer_owner(m_canvas, 0);
m_canvas->Bind(EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, [this](wxTimerEvent&) { m_gizmo_highlighter.blink(); });
m_canvas->Bind(EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, &GLCanvas3D::on_gizmo_highlighter_timer, this);
m_canvas->Bind(wxEVT_LEFT_DOWN, &GLCanvas3D::on_mouse, this);
m_canvas->Bind(wxEVT_LEFT_UP, &GLCanvas3D::on_mouse, this);
m_canvas->Bind(wxEVT_MIDDLE_DOWN, &GLCanvas3D::on_mouse, this);
@@ -3443,14 +3444,7 @@ void GLCanvas3D::bind_event_handlers()
m_canvas->Bind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
m_canvas->Bind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
m_canvas->Bind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
m_canvas->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent& evt) {
// The key-up that would commit a keyboard edit goes to whatever took the focus.
if (m_selection_edit.kind != SelectionEdit::None)
finish_selection_edit();
ImGui::SetWindowFocus(nullptr);
render();
evt.Skip();
});
m_canvas->Bind(wxEVT_KILL_FOCUS, &GLCanvas3D::on_kill_focus, this);
m_event_handlers_bound = true;
m_canvas->Bind(wxEVT_GESTURE_PAN, &GLCanvas3D::on_gesture, this);
@@ -3488,6 +3482,9 @@ void GLCanvas3D::unbind_event_handlers()
m_canvas->Unbind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
m_canvas->Unbind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
m_canvas->Unbind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
m_canvas->Unbind(wxEVT_KILL_FOCUS, &GLCanvas3D::on_kill_focus, this);
m_canvas->Unbind(EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, &GLCanvas3D::on_toolbar_highlighter_timer, this);
m_canvas->Unbind(EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, &GLCanvas3D::on_gizmo_highlighter_timer, this);
m_event_handlers_bound = false;
m_canvas->Unbind(wxEVT_GESTURE_PAN, &GLCanvas3D::on_gesture, this);
@@ -5005,6 +5002,26 @@ void GLCanvas3D::on_set_focus(wxFocusEvent& evt)
m_is_touchpad_navigation = wxGetApp().app_config->get_bool("camera_navigation_style");
}
void GLCanvas3D::on_kill_focus(wxFocusEvent& evt)
{
// The key-up that would commit a keyboard edit goes to whatever took the focus.
if (m_selection_edit.kind != SelectionEdit::None)
finish_selection_edit();
ImGui::SetWindowFocus(nullptr);
render();
evt.Skip();
}
void GLCanvas3D::on_toolbar_highlighter_timer(wxTimerEvent& evt)
{
m_toolbar_highlighter.blink();
}
void GLCanvas3D::on_gizmo_highlighter_timer(wxTimerEvent& evt)
{
m_gizmo_highlighter.blink();
}
bool GLCanvas3D::clicked_button_matches_action(const wxMouseEvent& evt, const MouseAction action, const std::map<MouseButton, MouseAction>& mappings) const
{
MouseButton clicked = MouseButton::None;
@@ -7970,16 +7987,9 @@ void GLCanvas3D::_render_fps_overlay(int fps) const
const float margin = 10.0f * get_scale();
const ImVec2 display_size = ImGui::GetIO().DisplaySize;
ImVec2 pos(display_size.x - margin, margin);
// Last frame's size; zero until the overlay has been shown once.
const ImGuiWindow* self = ImGui::FindWindowByName("###fps_overlay");
const float left = pos.x - (self != nullptr ? self->Size.x : 0.0f);
// The Preview legend takes the top-right corner.
if (const ImGuiWindow* legend = ImGui::FindWindowByName("Legend"); m_canvas_type == ECanvasType::CanvasPreview && legend != nullptr && legend->Active)
pos = ImVec2(legend->Pos.x - margin, legend->Pos.y);
// The toolbar row can reach the corner on a narrow canvas; stack the overlay below it then.
else if (m_main_toolbar.is_enabled() &&
get_main_toolbar_offset() + m_main_toolbar.get_width() + m_separator_toolbar.get_width() + m_gizmos.get_scaled_total_width() + m_assemble_view_toolbar.get_width() > left)
pos.y = std::max(m_main_toolbar.get_height(), m_gizmos.get_scaled_total_height()) + margin;
ImGui::SetNextWindowPos(pos, ImGuiCond_Always, ImVec2(1.0f, 0.0f));
ImGui::SetNextWindowBgAlpha(0.35f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f * get_scale());
+3
View File
@@ -1203,6 +1203,9 @@ public:
void on_gesture(wxGestureEvent& evt);
void on_paint(wxPaintEvent& evt);
void on_set_focus(wxFocusEvent& evt);
void on_kill_focus(wxFocusEvent& evt);
void on_toolbar_highlighter_timer(wxTimerEvent& evt);
void on_gizmo_highlighter_timer(wxTimerEvent& evt);
void force_set_focus();
enum class MouseButton { None, Left, Middle, Right };
-1
View File
@@ -311,7 +311,6 @@ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS2)(
using namespace std::literals;
namespace pt = boost::property_tree;
using json = nlohmann::json;
struct StaticBambuLib
{
+13 -6
View File
@@ -25,6 +25,7 @@
#include <string>
#include <map>
#include <vector>
#include <memory>
#include "libslic3r/PrintConfig.hpp"
#include <wx/gdicmn.h>
#include "slic3r/GUI/wxExtensions.hpp"
@@ -2081,9 +2082,15 @@ wxMenu* MenuFactory::instance_menu()
return &m_instance_menu;
}
MenuWithSeparators* MenuFactory::new_transient_menu()
{
m_transient_menu = std::make_unique<MenuWithSeparators>();
return m_transient_menu.get();
}
wxMenu* MenuFactory::layer_menu()
{
MenuWithSeparators* menu = new MenuWithSeparators();
MenuWithSeparators* menu = new_transient_menu();
append_menu_item_settings(menu);
return menu;
@@ -2109,13 +2116,13 @@ wxMenu* MenuFactory::multi_selection_menu()
}
if (all_plates) {
wxMenu* menu = new MenuWithSeparators();
wxMenu* menu = new_transient_menu();
append_menu_item_replace_all_with_stl(menu);
return menu;
}
if (undefined_type)
return nullptr;
wxMenu* menu = new MenuWithSeparators();
wxMenu* menu = new_transient_menu();
if (!multi_volume) {
int index = 0;
if (obj_list()->can_merge_to_multipart_object()) {
@@ -2189,7 +2196,7 @@ wxMenu* MenuFactory::assemble_multi_selection_menu()
// show this menu only for Objects(Instances mixed with Objects)/Volumes selection
return nullptr;
wxMenu* menu = new MenuWithSeparators();
wxMenu* menu = new_transient_menu();
append_menu_item_set_visible(menu);
//append_menu_item_fix_through_cgal(menu);
//append_menu_item_simplify(menu);
@@ -2235,7 +2242,7 @@ wxMenu* MenuFactory::plate_menu()
wxMenu* MenuFactory::assemble_object_menu()
{
wxMenu* menu = new MenuWithSeparators();
wxMenu* menu = new_transient_menu();
// Set Visible
append_menu_item_set_visible(menu);
// Delete
@@ -2255,7 +2262,7 @@ wxMenu* MenuFactory::assemble_object_menu()
wxMenu* MenuFactory::assemble_part_menu()
{
wxMenu* menu = new MenuWithSeparators();
wxMenu* menu = new_transient_menu();
append_menu_item_set_visible(menu);
append_menu_item_delete(menu);
+10
View File
@@ -2,6 +2,7 @@
#define slic3r_GUI_Factories_hpp_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <array>
@@ -121,6 +122,12 @@ private:
MenuWithSeparators m_assemble_part_menu;
wxMenu m_filament_action_menu;
// The selection dependent menus are rebuilt for every popup, so they cannot be members that
// outlive a build like the ones above; this owns the current one and destroys the previous.
// One slot is enough because PopupMenu() is synchronous: the menu a caller was handed is gone
// from the screen before anything can ask for the next one.
std::unique_ptr<MenuWithSeparators> m_transient_menu;
// Removed/Prepended Items according to the view mode
@@ -128,6 +135,9 @@ private:
std::array<wxMenuItem*, mtCount> items_decrease;
std::array<wxMenuItem*, mtCount> items_set_number_of_copies;
// Replaces m_transient_menu with an empty menu and returns it.
MenuWithSeparators* new_transient_menu();
void create_default_menu();
void create_common_object_menu(wxMenu *menu);
void create_object_menu();
+1 -1
View File
@@ -3651,7 +3651,7 @@ void GLGizmoCut3D::perform_cut(const Selection& selection)
// model_name failing reason
std::vector<std::pair<std::string, std::string>> failed_models;
auto plater = wxGetApp().plater();
auto fix_and_update_progress = [keep_painting](ModelObject *model_object, const int vol_idx, const std::string &model_name, ProgressDialog &progress_dlg,
auto fix_and_update_progress = [keep_painting](ModelObject *model_object, const int vol_idx, const string &model_name, ProgressDialog &progress_dlg,
std::vector<std::string> &succes_models, std::vector<std::pair<std::string, std::string>> &failed_models) {
wxString msg = _L("Repairing model object");
msg += ": " + from_u8(model_name) + "\n";
+4
View File
@@ -2317,6 +2317,10 @@ void GLGizmoMeasure::update_measurement_result()
void GLGizmoMeasure::reset_all_pick()
{
std::map<GLVolume*, std::shared_ptr<PickRaycaster>>().swap(m_mesh_raycaster_map);
// register_single_mesh_pick() fills both maps in lockstep, so the measurings have to go with
// the raycasters; otherwise the entries keyed on the GLVolumes of the previous selection stay
// behind for the rest of the session.
std::map<GLVolume*, std::shared_ptr<Measure::Measuring>>().swap(m_mesh_measure_map);
reset_gripper_pick(GripperType::UNDEFINE,true);
}
+4 -3
View File
@@ -37,8 +37,7 @@ enum class PainterGizmoType {
FDM_SUPPORTS,
SEAM,
MM_SEGMENTATION,
FUZZY_SKIN,
TEXTURE_DISPLACEMENT
FUZZY_SKIN
};
class TriangleSelectorGUI : public TriangleSelector {
@@ -112,7 +111,9 @@ class TriangleSelectorPatch : public TriangleSelectorGUI {
public:
explicit TriangleSelectorPatch(const TriangleMesh& mesh, const std::vector<ColorRGBA> ebt_colors, float edge_limit = 0.6f)
: TriangleSelectorGUI(mesh, edge_limit), m_ebt_colors(ebt_colors) {}
virtual ~TriangleSelectorPatch() = default;
// Releases the VAO and the per-patch VBOs built by finalize_triangle_indices(). The base class
// already deletes GL buffers from its GLModel members here, so this needs no context of its own.
virtual ~TriangleSelectorPatch() { release_geometry(); }
// Render current selection. Transformation matrices are supposed
// to be already set.
+1 -2
View File
@@ -6,7 +6,7 @@
#include "DeviceCore/DevManager.h"
#include "DeviceCore/DevUtil.h"
#include "Http.hpp"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "libslic3r/AppConfig.hpp"
#include <boost/filesystem/operations.hpp>
@@ -26,7 +26,6 @@
#include <ctime>
namespace fs = boost::filesystem;
using json = nlohmann::json;
static const char* HMS_PATH = "hms";
static const char* HMS_LOCAL_IMG_PATH = "hms/local_image";
+1 -1
View File
@@ -1405,7 +1405,7 @@ void IMSlider::render_input_custom_gcode(std::string custom_gcode)
}
void IMSlider::do_go_to_layer(size_t layer_number) {
layer_number = std::clamp((int)layer_number, m_min_value, m_max_value);
layer_number = clamp((int)layer_number, m_min_value, m_max_value);
GetSelection() == ssLower ? SetLowerValue(layer_number) : SetHigherValue(layer_number);
}
+44 -4
View File
@@ -385,6 +385,7 @@ ImGuiWrapper::~ImGuiWrapper()
{
//destroy_fonts_texture();
destroy_font();
destroy_svg_textures();
ImGui::DestroyContext();
}
@@ -566,6 +567,12 @@ bool ImGuiWrapper::update_key_data(wxKeyEvent &evt)
return ret;
}
// SVG icons rasterized into GL textures, keyed on file name, size and recolor. Cleared as a whole
// from new_frame() once it grows past MAX_SVG_TEXTURES, which is safe there: the previous frame has
// been rendered and the frame about to be recorded asks for every icon it draws again.
static std::map<std::string, ImTextureID> s_svg_textures;
static const size_t MAX_SVG_TEXTURES = 256;
void ImGuiWrapper::new_frame()
{
if (m_new_frame_open) {
@@ -576,6 +583,11 @@ void ImGuiWrapper::new_frame()
init_font(true);
}
// Recolored icons accumulate one texture per color the session has shown; drop them before
// anything references them again. This frame recreates the handful it actually draws.
if (s_svg_textures.size() > MAX_SVG_TEXTURES)
destroy_svg_textures();
ImGuiIO& io = ImGui::GetIO();
ImGui::NewFrame();
@@ -1828,8 +1840,7 @@ bool menu_item_with_icon(const char *label, const char *shortcut, ImVec2 icon_si
if (icon_color != 0)
ImGui::RenderFrame(icon_pos, icon_pos + icon_size, icon_color);
else {
static ImTextureID transparent;
IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/transparent.svg", icon_size.x, icon_size.y, transparent);
ImTextureID transparent = ImGuiWrapper::svg_texture(Slic3r::resources_dir() + "/images/transparent.svg", icon_size.x, icon_size.y);
window->DrawList->AddImage(transparent, icon_pos, icon_pos + icon_size, { 0,0 }, { 1,1 }, ImGui::GetColorU32(ImVec4(1.f, 1.f, 1.f, 1.f)));
}
}
@@ -3409,6 +3420,36 @@ bool ImGuiWrapper::display_initialized() const
return io.DisplaySize.x >= 0.0f && io.DisplaySize.y >= 0.0f;
}
ImTextureID ImGuiWrapper::svg_texture(const std::string& filename, unsigned width, unsigned height, const char* hex_color)
{
std::string key = filename + "|" + std::to_string(width) + "x" + std::to_string(height);
if (hex_color != nullptr)
key += std::string("|") + hex_color;
const auto it = s_svg_textures.find(key);
if (it != s_svg_textures.end())
return it->second;
ImTextureID texture_id = nullptr;
const bool loaded = (hex_color != nullptr) ?
BitmapCache::load_from_svg_file_change_color(filename, width, height, texture_id, hex_color) :
IMTexture::load_from_svg_file(filename, width, height, texture_id);
if (!loaded)
return nullptr;
s_svg_textures.emplace(std::move(key), texture_id);
return texture_id;
}
void ImGuiWrapper::destroy_svg_textures()
{
for (const auto& texture : s_svg_textures) {
GLuint texture_id = (GLuint)(intptr_t)texture.second;
glsafe(::glDeleteTextures(1, &texture_id));
}
s_svg_textures.clear();
}
void ImGuiWrapper::destroy_font()
{
if (m_font_texture != 0) {
@@ -3488,7 +3529,6 @@ void ImGuiWrapper::filament_group(const std::string& filament_type, const char*
//ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
std::string id = std::to_string(static_cast<unsigned int> (filament_id + 1));
ImDrawList* draw_list = ImGui::GetWindowDrawList();
static ImTextureID transparent;
ImVec2 text_size = ImGui::CalcTextSize(filament_type.c_str());
// BBS image sizing based on text width (DPI scaling)
float img_width = ImGui::CalcTextSize("ABC").x;
@@ -3501,7 +3541,7 @@ void ImGuiWrapper::filament_group(const std::string& filament_type, const char*
if (rgba[3] == 0x00) {
svg_path = "/images/outlined_rect_transparent.svg";
}
BitmapCache::load_from_svg_file_change_color(Slic3r::resources_dir() + svg_path, img_size.x, img_size.y, transparent, hex_color);
ImTextureID transparent = svg_texture(Slic3r::resources_dir() + svg_path, img_size.x, img_size.y, hex_color);
ImGui::BeginGroup();
{
ImVec2 cursor_pos = ImGui::GetCursorScreenPos();
+8
View File
@@ -108,6 +108,14 @@ public:
// Hash of every draw list's vertices, indices and commands.
static ImGuiID draw_data_signature(const ImDrawData* draw_data);
// A GL texture holding an SVG icon rasterized at width x height, optionally recolored.
// Rasterizing an SVG is far too expensive to redo for every frame that draws the icon, and the
// texture the previous frame generated would leak, so the result is kept until the frame that
// finds the cache overgrown drops it (and rebuilds only what it still draws).
static ImTextureID svg_texture(const std::string& filename, unsigned width, unsigned height, const char* hex_color = nullptr);
// Deletes every texture svg_texture() handed out. Requires a current GL context.
static void destroy_svg_textures();
float scaled(float x) const { return x * m_font_size; }
ImVec2 scaled(float x, float y) const { return ImVec2(x * m_font_size, y * m_font_size); }
/// <summary>
+1 -2
View File
@@ -19,7 +19,7 @@
#include <boost/log/trivial.hpp>
#include <functional>
#include <cstddef>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <wx/string.h>
#include "slic3r/GUI/PartPlate.hpp"
#include "libslic3r/PrintConfig.hpp"
@@ -39,7 +39,6 @@
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -2
View File
@@ -1,5 +1,5 @@
#include "SendJob.hpp"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "bambu_networking.hpp"
#include "libslic3r/LifecycleEvents.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -23,7 +23,6 @@
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -3
View File
@@ -34,7 +34,7 @@
#include "slic3r/GUI/Widgets/SideMenuPopup.hpp"
#include <utility>
#include "libslic3r/libslic3r.h"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <algorithm>
#include <wx/dirdlg.h>
#include <exception>
@@ -155,8 +155,6 @@
#include <wx/window.h>
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
-2
View File
@@ -45,8 +45,6 @@
#include "../Utils/MacDarkMode.hpp"
#endif
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -3
View File
@@ -13,7 +13,7 @@
#include "slic3r/GUI/Widgets/WebView.hpp"
#include <wx/log.h>
#include <wx/webview.h>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <exception>
#include <wx/wx.h>
#include <wx/sizer.h>
@@ -24,8 +24,6 @@
#include "GUI_App.hpp"
#include "Plater.hpp"
using json = nlohmann::json;
namespace Slic3r::GUI { class Plater; }
namespace Slic3r {
+1 -3
View File
@@ -15,7 +15,7 @@
#include "slic3r/GUI/StatusPanel.hpp"
#include "slic3r/GUI/UpgradePanel.hpp"
#include "slic3r/GUI/Widgets/SideTools.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <wx/app.h>
#include <wx/bookctrl.h>
#include <wx/button.h>
@@ -57,8 +57,6 @@
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/Widgets/Button.hpp"
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+2 -1
View File
@@ -2250,11 +2250,12 @@ void NotificationManager::close_and_delete_self(PopNotification * self)
}
void NotificationManager::remove_notification_of_type(const NotificationType type) {
// Seven notification types may have several instances alive at once, so erase every match:
// stopping at the first one leaves the rest (and the ObjectIDs they hold) behind.
for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
std::unique_ptr<PopNotification> &notification = *it;
if (notification->get_type() == type) {
it = m_pop_notifications.erase(it);
break;
} else
++it;
}
+2 -2
View File
@@ -631,8 +631,8 @@ private:
// Aditional text after hypertext - currently not used
std::string m_text2;
// mark for render operation
size_t pos_start = std::string::npos;
size_t pos_end = std::string::npos;
size_t pos_start = string::npos;
size_t pos_end = string::npos;
std::string error_start = "<Error>";
std::string error_end = "</Error>";
+1 -4
View File
@@ -16,7 +16,7 @@
#include <vector>
#include <utility>
#include "slic3r/GUI/GUI.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <wx/app.h>
#include <wx/event.h>
#include <wx/filename.h>
@@ -32,9 +32,6 @@
#include <OrcaCloudServiceAgent.hpp>
#include <wx/event.h>
#include <wx/utils.h>
using json = nlohmann::json;
namespace Slic3r { namespace GUI {
PresetBundleDialog::PresetBundleDialog(
@@ -58,8 +58,6 @@
//#define PRINTER_FILE_SYSTEM_TEST
#endif
using json = nlohmann::json;
std::string last_system_error() {
return Slic3r::decode_path(std::error_code(
#ifdef _WIN32
+8 -7
View File
@@ -22,6 +22,7 @@
#include <boost/enable_shared_from_this.hpp>
#include "nlohmann/json_fwd.hpp"
using nlohmann::json;
#include <functional>
#include <deque>
@@ -289,17 +290,17 @@ private:
static void DumpLog(void* context, int level, tchar const *msg);
private:
template<typename T> using Translator = std::function<int(nlohmann::json const &, T &, unsigned char const *)>;
template<typename T> using Translator = std::function<int(json const &, T &, unsigned char const *)>;
typedef std::function<void(int, nlohmann::json const & resp)> callback_t;
typedef std::function<void(int, json const & resp)> callback_t;
typedef std::function<int(int, nlohmann::json const &resp, unsigned char const *data)> callback_t2;
typedef std::function<int(int, json const &resp, unsigned char const *data)> callback_t2;
typedef std::function<int(std::string &msg)> callback_t3;
template<typename T> boost::uint32_t SendRequest(int type, nlohmann::json const &req, Translator<T> const &translator, Callback<T> const &callback, const std::string &param = "")
template<typename T> boost::uint32_t SendRequest(int type, json const &req, Translator<T> const &translator, Callback<T> const &callback, const std::string &param = "")
{
auto c = [translator, callback, this](int result, nlohmann::json const &resp, unsigned char const *data) -> int
auto c = [translator, callback, this](int result, json const &resp, unsigned char const *data) -> int
{
T t;
if (result == 0 || result == CONTINUE || result == FILE_EXIST) {
@@ -322,7 +323,7 @@ private:
template<typename T>
void InstallNotify(int type, Translator<T> const& translator, Applier<T> const& applier)
{
auto c = [translator, applier, this](int result, nlohmann::json const &resp, unsigned char const *data) -> int
auto c = [translator, applier, this](int result, json const &resp, unsigned char const *data) -> int
{
T t;
if (result == 0 || result == CONTINUE) {
@@ -344,7 +345,7 @@ private:
InstallNotify(type, c);
}
boost::uint32_t SendRequest(int type, nlohmann::json const &req, callback_t2 const &callback, const std::string &param = "");
boost::uint32_t SendRequest(int type, json const &req, callback_t2 const &callback, const std::string &param = "");
void InstallNotify(int type, callback_t2 const &callback);
+1 -3
View File
@@ -6,6 +6,7 @@
#include <wx/gdicmn.h>
#include <wx/settings.h>
#include <cstddef>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/GUI.hpp"
#include <exception>
#include <wx/msgdlg.h>
@@ -29,9 +30,6 @@
#include <sstream>
#include <slic3r/GUI/Widgets/WebView.hpp>
using json = nlohmann::json;
//------------------------------------------
// PrinterCloundAuthDialog
//------------------------------------------
+2 -3
View File
@@ -16,7 +16,7 @@
#include <string>
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/Auxiliary.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <cstddef>
#include <memory>
#include <map>
@@ -54,8 +54,7 @@
#include <slic3r/GUI/Widgets/WebView.hpp>
#include "slic3r/GUI/Jobs/SendJob.hpp"
#include "slic3r/GUI/Plater.hpp"
using json = nlohmann::json;
#include "slic3r/Utils/json_diff.hpp"
class wxWindow;
+2 -1
View File
@@ -30,6 +30,7 @@
#include <wx/timer.h>
#include "nlohmann/json.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <atomic>
#include <map>
@@ -108,7 +109,7 @@ public:
void OnScriptMessage(wxWebViewEvent& evt);
void RunScript(std::string content);
std::map<std::string, std::vector<nlohmann::json>> Reload(wxString aux_path);
std::map<std::string, std::vector<json>> Reload(wxString aux_path);
std::string formatBytes(unsigned long bytes);
wxString to_base64(std::string path);
};
-2
View File
@@ -74,8 +74,6 @@
#include "slic3r/Utils/NetworkAgent.hpp"
#include <boost/filesystem.hpp>
using json = nlohmann::json;
namespace Slic3r::GUI { class Plater; }
namespace fs = boost::filesystem;
+1 -3
View File
@@ -62,7 +62,7 @@
#include <cstdio>
#include <cstddef>
#include "libslic3r/Config.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <exception>
#include <cstdlib>
#include <map>
@@ -133,8 +133,6 @@
#include "slic3r/Utils/NetworkAgent.hpp"
#include <boost/filesystem.hpp>
using json = nlohmann::json;
namespace Slic3r { class PrintBase; }
namespace fs = boost::filesystem;
+1 -2
View File
@@ -26,7 +26,7 @@
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "slic3r/GUI/PartPlate.hpp"
#include "libslic3r/PrintConfig.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/MsgDialog.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
#include "slic3r/GUI/Widgets/TextInput.hpp"
@@ -77,7 +77,6 @@
#include <wx/dcgraph.h>
namespace fs = boost::filesystem;
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+2 -2
View File
@@ -23,7 +23,7 @@
#include <unordered_set>
#include "slic3r/GUI/wxMediaCtrl3.h"
#include "slic3r/GUI/Widgets/StaticBox.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <boost/date_time/posix_time/ptime.hpp>
#include <map>
#include "libslic3r/calib.hpp"
@@ -689,7 +689,7 @@ protected:
int m_last_vcamera = -1;
int m_model_mall_request_count = 0;
bool m_is_load_with_temp = false;
nlohmann::json m_rating_result;
json m_rating_result;
wxWebRequest web_request;
bool bed_temp_input = false;
+1 -2
View File
@@ -15,7 +15,7 @@
#include "libslic3r/Utils.hpp"
#include <string>
#include "slic3r/GUI/BBLStatusBarPrint.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <cassert>
#include "libslic3r/PrintConfig.hpp"
#include <cstdlib>
@@ -85,7 +85,6 @@
#include "slic3r/Utils/NetworkAgent.hpp"
namespace fs = boost::filesystem;
using json = nlohmann::json;
using namespace Slic3r;
using namespace Slic3r::GUI;
+1 -1
View File
@@ -2928,7 +2928,7 @@ void TabPrint::build()
optgroup->append_single_option_line("skin_infill_line_width", "strength_settings_patterns#locked-zag");
optgroup->append_single_option_line("skeleton_infill_line_width", "strength_settings_patterns#locked-zag");
optgroup->append_single_option_line("symmetric_infill_y_axis", "strength_settings_infill#symmetric-infill-y-axis");
optgroup->append_single_option_line("infill_complete_top", "strength_settings_patterns#fill-pattern-tops");
optgroup->append_single_option_line("infill_complete_top", "strength_settings_infill#infill-complete-top");
optgroup->append_single_option_line("infill_shift_step", "strength_settings_patterns#cross-hatch");
optgroup->append_single_option_line("lateral_lattice_angle_1", "strength_settings_patterns#lateral-lattice");
optgroup->append_single_option_line("lateral_lattice_angle_2", "strength_settings_patterns#lateral-lattice");
+1
View File
@@ -20,6 +20,7 @@
#include <vector>
#include <map>
#include <utility>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
using namespace nlohmann;
+1 -3
View File
@@ -1,4 +1,4 @@
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "UserManager.hpp"
#include "BindDialog.hpp"
#include "GUI_App.hpp"
@@ -10,8 +10,6 @@
#include <wx/string.h>
using json = nlohmann::json;
namespace Slic3r {
UserManager::UserManager(NetworkAgent* agent)
+3
View File
@@ -9,9 +9,12 @@
#include <chrono>
#include <boost/thread.hpp>
#include "nlohmann/json.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include "slic3r/Utils/NetworkAgent.hpp"
using namespace nlohmann;
namespace Slic3r {
class NetworkAgent;
+1 -1
View File
@@ -4,7 +4,7 @@
#include "slic3r/GUI/GUI.hpp"
#include <boost/filesystem/path.hpp>
#include <boost/log/trivial.hpp>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <exception>
#include <string.h>
#include "I18N.hpp"
+2 -1
View File
@@ -36,7 +36,7 @@
#include "libslic3r/PresetBundle.hpp"
#include "libslic3r/PresetCacheFormat.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "libslic3r_version.h"
#include <string>
@@ -78,6 +78,7 @@
#include "libslic3r/PrintConfig.hpp"
#include "slic3r/Utils/NetworkAgent.hpp"
#include "slic3r/Utils/PresetUpdater.hpp"
#include "slic3r/Utils/json_diff.hpp"
class wxWindow;
+1
View File
@@ -5,6 +5,7 @@
#include "slic3r/GUI/HttpServer.hpp"
#include <memory>
#include <boost/log/trivial.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/GUI.hpp"
#include <exception>
#include <boost/filesystem/path.hpp>
+1 -2
View File
@@ -24,7 +24,7 @@
#include <wx/filename.h>
#include <sstream>
#include <string>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <functional>
#include <cstddef>
#include <wx/dialog.h>
@@ -44,7 +44,6 @@
#include <wx/infobar.h>
namespace pt = boost::property_tree;
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -3
View File
@@ -3,7 +3,7 @@
#include "../I18N.hpp"
#include "../GUI_App.hpp"
#include "../MsgDialog.hpp"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include <wx/anybutton.h>
#include <wx/event.h>
@@ -28,8 +28,6 @@
#include <wx/stattext.h>
#include <wx/sizer.h>
using json = nlohmann::json;
namespace Slic3r { namespace GUI {
wxDEFINE_EVENT(EVT_FAN_SWITCH_ON, wxCommandEvent);
+1 -2
View File
@@ -12,7 +12,7 @@
#include "Label.hpp"
#include "ComboBox.hpp"
#include "StaticBox.hpp"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "libslic3r/PresetBundle.hpp"
#include "libslic3r/Utils.hpp"
@@ -55,7 +55,6 @@
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
using json = nlohmann::json;
namespace Slic3r { namespace GUI {
+2 -3
View File
@@ -38,12 +38,11 @@
#include "Widgets/Label.hpp"
#include "MainFrame.hpp"
#include "libslic3r/PresetBundle.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/Jobs/SendJob.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <boost/filesystem.hpp>
using json = nlohmann::json;
class wxWindow;
namespace fs = boost::filesystem;

Some files were not shown because too many files have changed in this diff Show More