mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 14:44:19 -06:00
Merge branch 'master' of https://github.com/prusa3d/Slic3r into svg_icons
This commit is contained in:
commit
fab87ff1d9
42 changed files with 314 additions and 203 deletions
|
@ -638,7 +638,7 @@ void Choice::set_value(const boost::any& value, bool change_event)
|
|||
}
|
||||
case coEnum: {
|
||||
int val = boost::any_cast<int>(value);
|
||||
if (m_opt_id.compare("external_fill_pattern") == 0)
|
||||
if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern")
|
||||
{
|
||||
if (!m_opt.enum_values.empty()) {
|
||||
std::string key;
|
||||
|
@ -707,7 +707,7 @@ boost::any& Choice::get_value()
|
|||
if (m_opt.type == coEnum)
|
||||
{
|
||||
int ret_enum = static_cast<wxComboBox*>(window)->GetSelection();
|
||||
if (m_opt_id.compare("external_fill_pattern") == 0)
|
||||
if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern")
|
||||
{
|
||||
if (!m_opt.enum_values.empty()) {
|
||||
std::string key = m_opt.enum_values[ret_enum];
|
||||
|
|
|
@ -446,7 +446,7 @@ void FirmwareDialog::priv::prepare_common()
|
|||
"-U", (boost::format("flash:w:0:%1%:i") % hex_file.path.string()).str(),
|
||||
}};
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Invoking avrdude, arguments: "
|
||||
BOOST_LOG_TRIVIAL(info) << "Preparing arguments avrdude: "
|
||||
<< std::accumulate(std::next(args.begin()), args.end(), args[0], [](std::string a, const std::string &b) {
|
||||
return a + ' ' + b;
|
||||
});
|
||||
|
@ -492,7 +492,7 @@ void FirmwareDialog::priv::prepare_mk3()
|
|||
"-U", (boost::format("flash:w:1:%1%:i") % hex_file.path.string()).str(),
|
||||
}};
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Invoking avrdude for external flash flashing, arguments: "
|
||||
BOOST_LOG_TRIVIAL(info) << "Preparing avrdude arguments for external flash flashing: "
|
||||
<< std::accumulate(std::next(args.begin()), args.end(), args[0], [](std::string a, const std::string &b) {
|
||||
return a + ' ' + b;
|
||||
});
|
||||
|
@ -522,7 +522,7 @@ void FirmwareDialog::priv::prepare_mm_control()
|
|||
"-U", (boost::format("flash:w:0:%1%:i") % hex_file.path.string()).str(),
|
||||
}};
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Invoking avrdude, arguments: "
|
||||
BOOST_LOG_TRIVIAL(info) << "Preparing avrdude arguments: "
|
||||
<< std::accumulate(std::next(args.begin()), args.end(), args[0], [](std::string a, const std::string &b) {
|
||||
return a + ' ' + b;
|
||||
});
|
||||
|
@ -588,6 +588,13 @@ void FirmwareDialog::priv::perform_upload()
|
|||
|
||||
auto evt = new wxCommandEvent(EVT_AVRDUDE, q->GetId());
|
||||
auto wxmsg = wxString::FromUTF8(msg);
|
||||
#ifdef WIN32
|
||||
// The string might be in local encoding
|
||||
if (wxmsg.IsEmpty() && *msg != '\0') {
|
||||
wxmsg = wxString(msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
evt->SetExtraLong(AE_MESSAGE);
|
||||
evt->SetString(std::move(wxmsg));
|
||||
wxQueueEvent(q, evt);
|
||||
|
|
|
@ -4777,15 +4777,22 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
evt.SetY(evt.GetY() * scale);
|
||||
#endif
|
||||
|
||||
Point pos(evt.GetX(), evt.GetY());
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
auto imgui = wxGetApp().imgui();
|
||||
ImGuiWrapper *imgui = wxGetApp().imgui();
|
||||
if (imgui->update_mouse_data(evt)) {
|
||||
m_mouse.position = evt.Leaving() ? Vec2d(-1.0, -1.0) : pos.cast<double>();
|
||||
render();
|
||||
return;
|
||||
}
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
Point pos(evt.GetX(), evt.GetY());
|
||||
if (! evt.Entering() && ! evt.Leaving() && m_mouse.position.x() == -1.0) {
|
||||
// Workaround for SPE-832: There seems to be a mouse event sent to the window before evt.Entering()
|
||||
m_mouse.position = pos.cast<double>();
|
||||
render();
|
||||
}
|
||||
|
||||
if (m_picking_enabled)
|
||||
_set_current();
|
||||
|
|
|
@ -1470,7 +1470,7 @@ void GLGizmoFlatten::update_planes()
|
|||
TriangleMesh ch;
|
||||
for (const ModelVolume* vol : m_model_object->volumes)
|
||||
{
|
||||
if (vol->type() != ModelVolume::Type::MODEL_PART)
|
||||
if (vol->type() != ModelVolumeType::MODEL_PART)
|
||||
continue;
|
||||
TriangleMesh vol_ch = vol->get_convex_hull();
|
||||
vol_ch.transform(vol->get_matrix());
|
||||
|
|
|
@ -401,7 +401,7 @@ private:
|
|||
|
||||
// This holds information to decide whether recalculation is necessary:
|
||||
std::vector<Transform3d> m_volumes_matrices;
|
||||
std::vector<ModelVolume::Type> m_volumes_types;
|
||||
std::vector<ModelVolumeType> m_volumes_types;
|
||||
Vec3d m_first_instance_scale;
|
||||
Vec3d m_first_instance_mirror;
|
||||
|
||||
|
|
|
@ -211,8 +211,9 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
|
|||
}
|
||||
break;
|
||||
case coEnum:{
|
||||
if (opt_key.compare("external_fill_pattern") == 0 ||
|
||||
opt_key.compare("fill_pattern") == 0)
|
||||
if (opt_key == "top_fill_pattern" ||
|
||||
opt_key == "bottom_fill_pattern" ||
|
||||
opt_key == "fill_pattern")
|
||||
config.set_key_value(opt_key, new ConfigOptionEnum<InfillPattern>(boost::any_cast<InfillPattern>(value)));
|
||||
else if (opt_key.compare("gcode_flavor") == 0)
|
||||
config.set_key_value(opt_key, new ConfigOptionEnum<GCodeFlavor>(boost::any_cast<GCodeFlavor>(value)));
|
||||
|
|
|
@ -161,7 +161,7 @@ bool GUI_App::OnInit()
|
|||
|
||||
Bind(wxEVT_IDLE, [this](wxIdleEvent& event)
|
||||
{
|
||||
if (app_config->dirty())
|
||||
if (app_config->dirty() && app_config->get("autosave") == "1")
|
||||
app_config->save();
|
||||
|
||||
// ! Temporary workaround for the correct behavior of the Scrolled sidebar panel
|
||||
|
|
|
@ -818,7 +818,7 @@ void ObjectList::update_settings_item()
|
|||
}
|
||||
}
|
||||
|
||||
void ObjectList::append_menu_item_add_generic(wxMenuItem* menu, const int type) {
|
||||
void ObjectList::append_menu_item_add_generic(wxMenuItem* menu, const ModelVolumeType type) {
|
||||
auto sub_menu = new wxMenu;
|
||||
|
||||
if (wxGetApp().get_mode() == comExpert) {
|
||||
|
@ -827,10 +827,9 @@ void ObjectList::append_menu_item_add_generic(wxMenuItem* menu, const int type)
|
|||
sub_menu->AppendSeparator();
|
||||
}
|
||||
|
||||
std::vector<std::string> menu_items = { L("Box"), L("Cylinder"), L("Sphere"), L("Slab") };
|
||||
for (auto& item : menu_items) {
|
||||
for (auto& item : { L("Box"), L("Cylinder"), L("Sphere"), L("Slab") }) {
|
||||
append_menu_item(sub_menu, wxID_ANY, _(item), "",
|
||||
[this, type, item](wxCommandEvent&) { load_generic_subobject(_(item).ToUTF8().data(), type); }, "", menu->GetMenu());
|
||||
[this, type, item](wxCommandEvent&) { load_generic_subobject(item, type); }, "", menu->GetMenu());
|
||||
}
|
||||
|
||||
menu->SetSubMenu(sub_menu);
|
||||
|
@ -839,10 +838,10 @@ void ObjectList::append_menu_item_add_generic(wxMenuItem* menu, const int type)
|
|||
void ObjectList::append_menu_items_add_volume(wxMenu* menu)
|
||||
{
|
||||
// Note: id accords to type of the sub-object, so sequence of the menu items is important
|
||||
std::vector<std::string> menu_object_types_items = {L("Add part"), // ~ModelVolume::MODEL_PART
|
||||
L("Add modifier"), // ~ModelVolume::PARAMETER_MODIFIER
|
||||
L("Add support enforcer"), // ~ModelVolume::SUPPORT_ENFORCER
|
||||
L("Add support blocker") }; // ~ModelVolume::SUPPORT_BLOCKER
|
||||
std::vector<std::string> menu_object_types_items = {L("Add part"), // ~ModelVolumeType::MODEL_PART
|
||||
L("Add modifier"), // ~ModelVolumeType::PARAMETER_MODIFIER
|
||||
L("Add support enforcer"), // ~ModelVolumeType::SUPPORT_ENFORCER
|
||||
L("Add support blocker") }; // ~ModelVolumeType::SUPPORT_BLOCKER
|
||||
|
||||
// Update "add" items(delete old & create new) settings popupmenu
|
||||
for (auto& item : menu_object_types_items){
|
||||
|
@ -856,15 +855,15 @@ void ObjectList::append_menu_items_add_volume(wxMenu* menu)
|
|||
if (mode < comExpert)
|
||||
{
|
||||
append_menu_item(menu, wxID_ANY, _(L("Add part")), "",
|
||||
[this](wxCommandEvent&) { load_subobject(ModelVolume::MODEL_PART); }, *m_bmp_vector[ModelVolume::MODEL_PART]);
|
||||
[this](wxCommandEvent&) { load_subobject(ModelVolumeType::MODEL_PART); }, *m_bmp_vector[int(ModelVolumeType::MODEL_PART)]);
|
||||
}
|
||||
if (mode == comSimple) {
|
||||
append_menu_item(menu, wxID_ANY, _(L("Add support enforcer")), "",
|
||||
[this](wxCommandEvent&) { load_generic_subobject(_(L("Box")).ToUTF8().data(), ModelVolume::SUPPORT_ENFORCER); },
|
||||
*m_bmp_vector[ModelVolume::SUPPORT_ENFORCER]);
|
||||
[this](wxCommandEvent&) { load_generic_subobject(L("Box"), ModelVolumeType::SUPPORT_ENFORCER); },
|
||||
*m_bmp_vector[int(ModelVolumeType::SUPPORT_ENFORCER)]);
|
||||
append_menu_item(menu, wxID_ANY, _(L("Add support blocker")), "",
|
||||
[this](wxCommandEvent&) { load_generic_subobject(_(L("Box")).ToUTF8().data(), ModelVolume::SUPPORT_BLOCKER); },
|
||||
*m_bmp_vector[ModelVolume::SUPPORT_BLOCKER]);
|
||||
[this](wxCommandEvent&) { load_generic_subobject(L("Box"), ModelVolumeType::SUPPORT_BLOCKER); },
|
||||
*m_bmp_vector[int(ModelVolumeType::SUPPORT_BLOCKER)]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -875,7 +874,7 @@ void ObjectList::append_menu_items_add_volume(wxMenu* menu)
|
|||
|
||||
auto menu_item = new wxMenuItem(menu, wxID_ANY, _(item));
|
||||
menu_item->SetBitmap(*m_bmp_vector[type]);
|
||||
append_menu_item_add_generic(menu_item, type);
|
||||
append_menu_item_add_generic(menu_item, ModelVolumeType(type));
|
||||
|
||||
menu->Append(menu_item);
|
||||
}
|
||||
|
@ -924,7 +923,7 @@ wxMenuItem* ObjectList::append_menu_item_settings(wxMenu* menu_)
|
|||
menu->DestroySeparators(); // delete old separators
|
||||
|
||||
const auto sel_vol = get_selected_model_volume();
|
||||
if (sel_vol && sel_vol->type() >= ModelVolume::SUPPORT_ENFORCER)
|
||||
if (sel_vol && sel_vol->type() >= ModelVolumeType::SUPPORT_ENFORCER)
|
||||
return nullptr;
|
||||
|
||||
const ConfigOptionMode mode = wxGetApp().get_mode();
|
||||
|
@ -948,7 +947,7 @@ wxMenuItem* ObjectList::append_menu_item_settings(wxMenu* menu_)
|
|||
menu_item->SetBitmap(m_bmp_cog);
|
||||
|
||||
// const auto sel_vol = get_selected_model_volume();
|
||||
// if (sel_vol && sel_vol->type() >= ModelVolume::SUPPORT_ENFORCER)
|
||||
// if (sel_vol && sel_vol->type() >= ModelVolumeType::SUPPORT_ENFORCER)
|
||||
// menu_item->Enable(false);
|
||||
// else
|
||||
menu_item->SetSubMenu(create_settings_popupmenu(menu));
|
||||
|
@ -1103,7 +1102,7 @@ void ObjectList::update_opt_keys(t_config_option_keys& opt_keys)
|
|||
opt_keys.erase(opt_keys.begin() + i);
|
||||
}
|
||||
|
||||
void ObjectList::load_subobject(int type)
|
||||
void ObjectList::load_subobject(ModelVolumeType type)
|
||||
{
|
||||
auto item = GetSelection();
|
||||
if (!item || m_objects_model->GetParent(item) != wxDataViewItem(0))
|
||||
|
@ -1126,7 +1125,7 @@ void ObjectList::load_subobject(int type)
|
|||
|
||||
void ObjectList::load_part( ModelObject* model_object,
|
||||
wxArrayString& part_names,
|
||||
int type)
|
||||
ModelVolumeType type)
|
||||
{
|
||||
wxWindow* parent = wxGetApp().tab_panel()->GetPage(0);
|
||||
|
||||
|
@ -1159,7 +1158,7 @@ void ObjectList::load_part( ModelObject* model_object,
|
|||
#endif // !ENABLE_VOLUMES_CENTERING_FIXES
|
||||
volume->translate(delta);
|
||||
auto new_volume = model_object->add_volume(*volume);
|
||||
new_volume->set_type(static_cast<ModelVolume::Type>(type));
|
||||
new_volume->set_type(type);
|
||||
new_volume->name = boost::filesystem::path(input_file).filename().string();
|
||||
|
||||
part_names.Add(from_u8(new_volume->name));
|
||||
|
@ -1174,28 +1173,28 @@ void ObjectList::load_part( ModelObject* model_object,
|
|||
|
||||
}
|
||||
|
||||
void ObjectList::load_generic_subobject(const std::string& type_name, const int type)
|
||||
void ObjectList::load_generic_subobject(const std::string& type_name, const ModelVolumeType type)
|
||||
{
|
||||
const auto obj_idx = get_selected_obj_idx();
|
||||
if (obj_idx < 0) return;
|
||||
|
||||
const std::string name = "lambda-" + type_name;
|
||||
const wxString name = _(L("Generic")) + "-" + _(type_name);
|
||||
TriangleMesh mesh;
|
||||
|
||||
auto& bed_shape = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionPoints>("bed_shape")->values;
|
||||
const auto& sz = BoundingBoxf(bed_shape).size();
|
||||
const auto side = 0.1 * std::max(sz(0), sz(1));
|
||||
|
||||
if (type_name == _("Box")) {
|
||||
if (type_name == "Box") {
|
||||
mesh = make_cube(side, side, side);
|
||||
// box sets the base coordinate at 0, 0, move to center of plate
|
||||
mesh.translate(-side * 0.5, -side * 0.5, 0);
|
||||
}
|
||||
else if (type_name == _("Cylinder"))
|
||||
else if (type_name == "Cylinder")
|
||||
mesh = make_cylinder(0.5*side, side);
|
||||
else if (type_name == _("Sphere"))
|
||||
else if (type_name == "Sphere")
|
||||
mesh = make_sphere(0.5*side, PI/18);
|
||||
else if (type_name == _("Slab")) {
|
||||
else if (type_name == "Slab") {
|
||||
const auto& size = (*m_objects)[obj_idx]->bounding_box().size();
|
||||
mesh = make_cube(size(0)*1.5, size(1)*1.5, size(2)*0.5);
|
||||
// box sets the base coordinate at 0, 0, move to center of plate and move it up to initial_z
|
||||
|
@ -1204,7 +1203,7 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const int
|
|||
mesh.repair();
|
||||
|
||||
auto new_volume = (*m_objects)[obj_idx]->add_volume(mesh);
|
||||
new_volume->set_type(static_cast<ModelVolume::Type>(type));
|
||||
new_volume->set_type(type);
|
||||
|
||||
#if !ENABLE_GENERIC_SUBPARTS_PLACEMENT
|
||||
new_volume->set_offset(Vec3d(0.0, 0.0, (*m_objects)[obj_idx]->origin_translation(2) - mesh.stl.stats.min(2)));
|
||||
|
@ -1231,7 +1230,7 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const int
|
|||
}
|
||||
#endif // ENABLE_GENERIC_SUBPARTS_PLACEMENT
|
||||
|
||||
new_volume->name = name;
|
||||
new_volume->name = into_u8(name);
|
||||
// set a default extruder value, since user can't add it manually
|
||||
new_volume->config.set_key_value("extruder", new ConfigOptionInt(0));
|
||||
|
||||
|
@ -1239,7 +1238,7 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const int
|
|||
parts_changed(obj_idx);
|
||||
|
||||
const auto object_item = m_objects_model->GetTopParent(GetSelection());
|
||||
select_item(m_objects_model->AddVolumeChild(object_item, from_u8(name), type));
|
||||
select_item(m_objects_model->AddVolumeChild(object_item, name, type));
|
||||
#ifndef __WXOSX__ //#ifdef __WXMSW__ // #ys_FIXME
|
||||
selection_changed();
|
||||
#endif //no __WXOSX__ //__WXMSW__
|
||||
|
@ -1371,7 +1370,7 @@ void ObjectList::split()
|
|||
for (auto id = 0; id < model_object->volumes.size(); id++) {
|
||||
const auto vol_item = m_objects_model->AddVolumeChild(parent, from_u8(model_object->volumes[id]->name),
|
||||
model_object->volumes[id]->is_modifier() ?
|
||||
ModelVolume::PARAMETER_MODIFIER : ModelVolume::MODEL_PART,
|
||||
ModelVolumeType::PARAMETER_MODIFIER : ModelVolumeType::MODEL_PART,
|
||||
model_object->volumes[id]->config.has("extruder") ?
|
||||
model_object->volumes[id]->config.option<ConfigOptionInt>("extruder")->value : 0,
|
||||
false);
|
||||
|
@ -1973,15 +1972,15 @@ void ObjectList::change_part_type()
|
|||
if (!volume)
|
||||
return;
|
||||
|
||||
const auto type = volume->type();
|
||||
if (type == ModelVolume::MODEL_PART)
|
||||
const ModelVolumeType type = volume->type();
|
||||
if (type == ModelVolumeType::MODEL_PART)
|
||||
{
|
||||
const int obj_idx = get_selected_obj_idx();
|
||||
if (obj_idx < 0) return;
|
||||
|
||||
int model_part_cnt = 0;
|
||||
for (auto vol : (*m_objects)[obj_idx]->volumes) {
|
||||
if (vol->type() == ModelVolume::MODEL_PART)
|
||||
if (vol->type() == ModelVolumeType::MODEL_PART)
|
||||
++model_part_cnt;
|
||||
}
|
||||
|
||||
|
@ -1993,13 +1992,13 @@ void ObjectList::change_part_type()
|
|||
|
||||
const wxString names[] = { "Part", "Modifier", "Support Enforcer", "Support Blocker" };
|
||||
|
||||
auto new_type = wxGetSingleChoiceIndex("Type: ", _(L("Select type of part")), wxArrayString(4, names), type);
|
||||
auto new_type = ModelVolumeType(wxGetSingleChoiceIndex("Type: ", _(L("Select type of part")), wxArrayString(4, names), int(type)));
|
||||
|
||||
if (new_type == type || new_type < 0)
|
||||
if (new_type == type || new_type == ModelVolumeType::INVALID)
|
||||
return;
|
||||
|
||||
const auto item = GetSelection();
|
||||
volume->set_type(static_cast<ModelVolume::Type>(new_type));
|
||||
volume->set_type(new_type);
|
||||
m_objects_model->SetVolumeType(item, new_type);
|
||||
|
||||
m_parts_changed = true;
|
||||
|
@ -2009,11 +2008,11 @@ void ObjectList::change_part_type()
|
|||
//(we show additional settings for Part and Modifier and hide it for Support Blocker/Enforcer)
|
||||
const auto settings_item = m_objects_model->GetSettingsItem(item);
|
||||
if (settings_item &&
|
||||
(new_type == ModelVolume::SUPPORT_ENFORCER || new_type == ModelVolume::SUPPORT_BLOCKER)) {
|
||||
(new_type == ModelVolumeType::SUPPORT_ENFORCER || new_type == ModelVolumeType::SUPPORT_BLOCKER)) {
|
||||
m_objects_model->Delete(settings_item);
|
||||
}
|
||||
else if (!settings_item &&
|
||||
(new_type == ModelVolume::MODEL_PART || new_type == ModelVolume::PARAMETER_MODIFIER)) {
|
||||
(new_type == ModelVolumeType::MODEL_PART || new_type == ModelVolumeType::PARAMETER_MODIFIER)) {
|
||||
select_item(m_objects_model->AddSettingsChild(item));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ class ConfigOptionsGroup;
|
|||
class DynamicPrintConfig;
|
||||
class ModelObject;
|
||||
class ModelVolume;
|
||||
enum class ModelVolumeType : int;
|
||||
|
||||
// FIXME: broken build on mac os because of this is missing:
|
||||
typedef std::vector<std::string> t_config_option_keys;
|
||||
|
@ -173,7 +174,7 @@ public:
|
|||
void get_freq_settings_choice(const wxString& bundle_name);
|
||||
void update_settings_item();
|
||||
|
||||
void append_menu_item_add_generic(wxMenuItem* menu, const int type);
|
||||
void append_menu_item_add_generic(wxMenuItem* menu, const ModelVolumeType type);
|
||||
void append_menu_items_add_volume(wxMenu* menu);
|
||||
wxMenuItem* append_menu_item_split(wxMenu* menu);
|
||||
wxMenuItem* append_menu_item_settings(wxMenu* menu);
|
||||
|
@ -190,9 +191,9 @@ public:
|
|||
|
||||
void update_opt_keys(t_config_option_keys& t_optopt_keys);
|
||||
|
||||
void load_subobject(int type);
|
||||
void load_part(ModelObject* model_object, wxArrayString& part_names, int type);
|
||||
void load_generic_subobject(const std::string& type_name, const int type);
|
||||
void load_subobject(ModelVolumeType type);
|
||||
void load_part(ModelObject* model_object, wxArrayString& part_names, ModelVolumeType type);
|
||||
void load_generic_subobject(const std::string& type_name, const ModelVolumeType type);
|
||||
void del_object(const int obj_idx);
|
||||
void del_subobject_item(wxDataViewItem& item);
|
||||
void del_settings_from_config();
|
||||
|
|
|
@ -101,6 +101,10 @@ void ImGuiWrapper::set_style_scaling(float scaling)
|
|||
|
||||
bool ImGuiWrapper::update_mouse_data(wxMouseEvent& evt)
|
||||
{
|
||||
if (! display_initialized()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.MousePos = ImVec2((float)evt.GetX(), (float)evt.GetY());
|
||||
io.MouseDown[0] = evt.LeftDown();
|
||||
|
@ -116,6 +120,10 @@ bool ImGuiWrapper::update_mouse_data(wxMouseEvent& evt)
|
|||
|
||||
bool ImGuiWrapper::update_key_data(wxKeyEvent &evt)
|
||||
{
|
||||
if (! display_initialized()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
if (evt.GetEventType() == wxEVT_CHAR) {
|
||||
|
@ -521,6 +529,12 @@ void ImGuiWrapper::render_draw_data(ImDrawData *draw_data)
|
|||
glScissor(last_scissor_box[0], last_scissor_box[1], (GLsizei)last_scissor_box[2], (GLsizei)last_scissor_box[3]);
|
||||
}
|
||||
|
||||
bool ImGuiWrapper::display_initialized() const
|
||||
{
|
||||
const ImGuiIO& io = ImGui::GetIO();
|
||||
return io.DisplaySize.x >= 0.0f && io.DisplaySize.y >= 0.0f;
|
||||
}
|
||||
|
||||
void ImGuiWrapper::destroy_device_objects()
|
||||
{
|
||||
destroy_fonts_texture();
|
||||
|
|
|
@ -75,6 +75,7 @@ private:
|
|||
void init_input();
|
||||
void init_style();
|
||||
void render_draw_data(ImDrawData *draw_data);
|
||||
bool display_initialized() const;
|
||||
void destroy_device_objects();
|
||||
void destroy_fonts_texture();
|
||||
|
||||
|
|
|
@ -147,11 +147,11 @@ void MainFrame::init_tabpanel()
|
|||
wxGetApp().obj_list()->create_popup_menus();
|
||||
|
||||
// The following event is emited by Tab implementation on config value change.
|
||||
Bind(EVT_TAB_VALUE_CHANGED, &MainFrame::on_value_changed, this);
|
||||
Bind(EVT_TAB_VALUE_CHANGED, &MainFrame::on_value_changed, this); // #ys_FIXME_to_delete
|
||||
|
||||
// The following event is emited by Tab on preset selection,
|
||||
// or when the preset's "modified" status changes.
|
||||
Bind(EVT_TAB_PRESETS_CHANGED, &MainFrame::on_presets_changed, this);
|
||||
Bind(EVT_TAB_PRESETS_CHANGED, &MainFrame::on_presets_changed, this); // #ys_FIXME_to_delete
|
||||
|
||||
create_preset_tabs();
|
||||
|
||||
|
@ -833,6 +833,7 @@ void MainFrame::select_view(const std::string& direction)
|
|||
m_plater->select_view(direction);
|
||||
}
|
||||
|
||||
// #ys_FIXME_to_delete
|
||||
void MainFrame::on_presets_changed(SimpleEvent &event)
|
||||
{
|
||||
auto *tab = dynamic_cast<Tab*>(event.GetEventObject());
|
||||
|
@ -857,6 +858,7 @@ void MainFrame::on_presets_changed(SimpleEvent &event)
|
|||
}
|
||||
}
|
||||
|
||||
// #ys_FIXME_to_delete
|
||||
void MainFrame::on_value_changed(wxCommandEvent& event)
|
||||
{
|
||||
auto *tab = dynamic_cast<Tab*>(event.GetEventObject());
|
||||
|
@ -872,12 +874,12 @@ void MainFrame::on_value_changed(wxCommandEvent& event)
|
|||
m_plater->on_extruders_change(value);
|
||||
}
|
||||
}
|
||||
// Don't save while loading for the first time.
|
||||
if (m_loaded) {
|
||||
AppConfig &cfg = *wxGetApp().app_config;
|
||||
if (cfg.get("autosave") == "1")
|
||||
cfg.save();
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::on_config_changed(DynamicPrintConfig* config) const
|
||||
{
|
||||
if (m_plater)
|
||||
m_plater->on_config_change(*config); // propagate config change events to the plater
|
||||
}
|
||||
|
||||
// Called after the Preferences dialog is closed and the program settings are saved.
|
||||
|
|
|
@ -96,6 +96,8 @@ public:
|
|||
void load_config(const DynamicPrintConfig& config);
|
||||
void select_tab(size_t tab) const;
|
||||
void select_view(const std::string& direction);
|
||||
// Propagate changed configuration from the Tab to the Platter and save changes to the AppConfig
|
||||
void on_config_changed(DynamicPrintConfig* cfg) const ;
|
||||
|
||||
PrintHostQueueDialog* printhost_queue_dlg() { return m_printhost_queue_dlg; }
|
||||
|
||||
|
|
|
@ -559,8 +559,9 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
|
|||
ret = config.opt_int(opt_key, idx);
|
||||
break;
|
||||
case coEnum:{
|
||||
if (opt_key.compare("external_fill_pattern") == 0 ||
|
||||
opt_key.compare("fill_pattern") == 0 ) {
|
||||
if (opt_key == "top_fill_pattern" ||
|
||||
opt_key == "bottom_fill_pattern" ||
|
||||
opt_key == "fill_pattern" ) {
|
||||
ret = static_cast<int>(config.option<ConfigOptionEnum<InfillPattern>>(opt_key)->value);
|
||||
}
|
||||
else if (opt_key.compare("gcode_flavor") == 0 ) {
|
||||
|
|
|
@ -521,7 +521,7 @@ struct Sidebar::priv
|
|||
|
||||
void Sidebar::priv::show_preset_comboboxes()
|
||||
{
|
||||
const bool showSLA = plater->printer_technology() == ptSLA;
|
||||
const bool showSLA = wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA;
|
||||
|
||||
wxWindowUpdateLocker noUpdates_scrolled(scrolled->GetParent());
|
||||
|
||||
|
@ -682,11 +682,12 @@ void Sidebar::remove_unused_filament_combos(const int current_extruder_count)
|
|||
void Sidebar::update_presets(Preset::Type preset_type)
|
||||
{
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
const auto print_tech = preset_bundle.printers.get_edited_preset().printer_technology();
|
||||
|
||||
switch (preset_type) {
|
||||
case Preset::TYPE_FILAMENT:
|
||||
{
|
||||
const int extruder_cnt = p->plater->printer_technology() != ptFFF ? 1 :
|
||||
const int extruder_cnt = print_tech != ptFFF ? 1 :
|
||||
dynamic_cast<ConfigOptionFloats*>(preset_bundle.printers.get_edited_preset().config.option("nozzle_diameter"))->values.size();
|
||||
const int filament_cnt = p->combos_filament.size() > extruder_cnt ? extruder_cnt : p->combos_filament.size();
|
||||
|
||||
|
@ -718,7 +719,7 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
|||
case Preset::TYPE_PRINTER:
|
||||
{
|
||||
// Update the print choosers to only contain the compatible presets, update the dirty flags.
|
||||
if (p->plater->printer_technology() == ptFFF)
|
||||
if (print_tech == ptFFF)
|
||||
preset_bundle.prints.update_platter_ui(p->combo_print);
|
||||
else {
|
||||
preset_bundle.sla_prints.update_platter_ui(p->combo_sla_print);
|
||||
|
@ -731,7 +732,7 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
|||
p->combo_printer->check_selection();
|
||||
// Update the filament choosers to only contain the compatible presets, update the color preview,
|
||||
// update the dirty flags.
|
||||
if (p->plater->printer_technology() == ptFFF) {
|
||||
if (print_tech == ptFFF) {
|
||||
for (size_t i = 0; i < p->combos_filament.size(); ++ i)
|
||||
preset_bundle.update_platter_filament_ui(i, p->combos_filament[i]);
|
||||
}
|
||||
|
@ -1991,6 +1992,7 @@ void Plater::priv::split_volume()
|
|||
|
||||
void Plater::priv::schedule_background_process()
|
||||
{
|
||||
delayed_error_message.clear();
|
||||
// Trigger the timer event after 0.5s
|
||||
this->background_process_timer.Start(500, wxTIMER_ONE_SHOT);
|
||||
// Notify the Canvas3D that something has changed, so it may invalidate some of the layer editing stuff.
|
||||
|
|
|
@ -356,7 +356,7 @@ const std::vector<std::string>& Preset::print_options()
|
|||
static std::vector<std::string> s_opts {
|
||||
"layer_height", "first_layer_height", "perimeters", "spiral_vase", "top_solid_layers", "bottom_solid_layers",
|
||||
"extra_perimeters", "ensure_vertical_shell_thickness", "avoid_crossing_perimeters", "thin_walls", "overhangs",
|
||||
"seam_position", "external_perimeters_first", "fill_density", "fill_pattern", "external_fill_pattern",
|
||||
"seam_position", "external_perimeters_first", "fill_density", "fill_pattern", "top_fill_pattern", "bottom_fill_pattern",
|
||||
"infill_every_layers", "infill_only_where_needed", "solid_infill_every_layers", "fill_angle", "bridge_angle",
|
||||
"solid_infill_below_area", "only_retract_when_crossing_perimeters", "infill_first", "max_print_speed",
|
||||
"max_volumetric_speed",
|
||||
|
|
|
@ -1435,7 +1435,8 @@ bool PresetBundle::parse_color(const std::string &scolor, unsigned char *rgb_out
|
|||
|
||||
void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, GUI::PresetComboBox *ui)
|
||||
{
|
||||
if (ui == nullptr || this->printers.get_edited_preset().printer_technology() == ptSLA)
|
||||
if (ui == nullptr || this->printers.get_edited_preset().printer_technology() == ptSLA ||
|
||||
this->filament_presets.size() <= idx_extruder )
|
||||
return;
|
||||
|
||||
unsigned char rgb[3];
|
||||
|
|
|
@ -669,7 +669,6 @@ void Tab::load_config(const DynamicPrintConfig& config)
|
|||
bool modified = 0;
|
||||
for(auto opt_key : m_config->diff(config)) {
|
||||
m_config->set_key_value(opt_key, config.option(opt_key)->clone());
|
||||
m_dirty_options.emplace(opt_key);
|
||||
modified = 1;
|
||||
}
|
||||
if (modified) {
|
||||
|
@ -752,8 +751,6 @@ void Tab::load_key_value(const std::string& opt_key, const boost::any& value, bo
|
|||
|
||||
void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
{
|
||||
m_dirty_options.erase(opt_key);
|
||||
|
||||
ConfigOptionsGroup* og_freq_chng_params = wxGetApp().sidebar().og_freq_chng_params(supports_printer_technology(ptFFF));
|
||||
if (opt_key == "fill_density" || opt_key == "supports_enable" || opt_key == "pad_enable")
|
||||
{
|
||||
|
@ -778,22 +775,29 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||
if (opt_key == "wipe_tower" || opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" )
|
||||
update_wiping_button_visibility();
|
||||
|
||||
if (opt_key == "extruders_count")
|
||||
wxGetApp().plater()->on_extruders_change(boost::any_cast<size_t>(value));
|
||||
|
||||
update();
|
||||
|
||||
// #ys_FIXME_to_delete
|
||||
// Post event to the Plater after updating of the all dirty options
|
||||
// It helps to avoid needless schedule_background_processing
|
||||
if (update_completed()) {
|
||||
wxCommandEvent event(EVT_TAB_VALUE_CHANGED);
|
||||
event.SetEventObject(this);
|
||||
event.SetString(opt_key);
|
||||
if (opt_key == "extruders_count")
|
||||
{
|
||||
const int val = boost::any_cast<size_t>(value);
|
||||
event.SetInt(val);
|
||||
}
|
||||
|
||||
wxPostEvent(this, event);
|
||||
}
|
||||
// if (update_completed())
|
||||
// if (m_update_stack.empty())
|
||||
// {
|
||||
// // wxCommandEvent event(EVT_TAB_VALUE_CHANGED);
|
||||
// // event.SetEventObject(this);
|
||||
// // event.SetString(opt_key);
|
||||
// // if (opt_key == "extruders_count")
|
||||
// // {
|
||||
// // const int val = boost::any_cast<size_t>(value);
|
||||
// // event.SetInt(val);
|
||||
// // }
|
||||
// //
|
||||
// // wxPostEvent(this, event);
|
||||
// wxGetApp().mainframe->on_value_changed(m_config);
|
||||
// }
|
||||
}
|
||||
|
||||
// Show/hide the 'purging volumes' button
|
||||
|
@ -826,10 +830,18 @@ void Tab::on_presets_changed()
|
|||
// refresh the print or filament/sla_material tab page.
|
||||
wxGetApp().get_tab(t)->load_current_preset();
|
||||
}
|
||||
// clear m_dependent_tabs after first update from select_preset()
|
||||
// to avoid needless preset loading from update() function
|
||||
m_dependent_tabs.clear();
|
||||
|
||||
// #ys_FIXME_to_delete
|
||||
// wxCommandEvent event(EVT_TAB_PRESETS_CHANGED);
|
||||
// event.SetEventObject(this);
|
||||
// wxPostEvent(this, event);
|
||||
|
||||
// Instead of PostEvent (EVT_TAB_PRESETS_CHANGED) just call update_presets
|
||||
wxGetApp().plater()->sidebar().update_presets(m_type);
|
||||
|
||||
wxCommandEvent event(EVT_TAB_PRESETS_CHANGED);
|
||||
event.SetEventObject(this);
|
||||
wxPostEvent(this, event);
|
||||
update_preset_description_line();
|
||||
}
|
||||
|
||||
|
@ -971,7 +983,8 @@ void TabPrint::build()
|
|||
optgroup = page->new_optgroup(_(L("Infill")));
|
||||
optgroup->append_single_option_line("fill_density");
|
||||
optgroup->append_single_option_line("fill_pattern");
|
||||
optgroup->append_single_option_line("external_fill_pattern");
|
||||
optgroup->append_single_option_line("top_fill_pattern");
|
||||
optgroup->append_single_option_line("bottom_fill_pattern");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Reducing printing time")));
|
||||
optgroup->append_single_option_line("infill_every_layers");
|
||||
|
@ -1165,6 +1178,7 @@ void TabPrint::update()
|
|||
if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptSLA)
|
||||
return; // ys_FIXME
|
||||
|
||||
// #ys_FIXME_to_delete
|
||||
//! Temporary workaround for the correct updates of the SpinCtrl (like "perimeters"):
|
||||
// KillFocus() for the wxSpinCtrl use CallAfter function. So,
|
||||
// to except the duplicate call of the update() after dialog->ShowModal(),
|
||||
|
@ -1172,6 +1186,7 @@ void TabPrint::update()
|
|||
// if (is_msg_dlg_already_exist) // ! It looks like a fixed problem after start to using of a m_dirty_options
|
||||
// return; // ! TODO Let delete this part of code after a common aplication testing
|
||||
|
||||
m_update_cnt++;
|
||||
Freeze();
|
||||
|
||||
double fill_density = m_config->option<ConfigOptionPercent>("fill_density")->value;
|
||||
|
@ -1280,7 +1295,7 @@ void TabPrint::update()
|
|||
}
|
||||
}
|
||||
if (!str_fill_pattern.empty()) {
|
||||
const std::vector<std::string> &external_fill_pattern = m_config->def()->get("external_fill_pattern")->enum_values;
|
||||
const std::vector<std::string> &external_fill_pattern = m_config->def()->get("top_fill_pattern")->enum_values;
|
||||
bool correct_100p_fill = false;
|
||||
for (const std::string &fill : external_fill_pattern)
|
||||
{
|
||||
|
@ -1321,7 +1336,7 @@ void TabPrint::update()
|
|||
|
||||
bool have_solid_infill = m_config->opt_int("top_solid_layers") > 0 || m_config->opt_int("bottom_solid_layers") > 0;
|
||||
// solid_infill_extruder uses the same logic as in Print::extruders()
|
||||
for (auto el : {"external_fill_pattern", "infill_first", "solid_infill_extruder",
|
||||
for (auto el : {"top_fill_pattern", "bottom_fill_pattern", "infill_first", "solid_infill_extruder",
|
||||
"solid_infill_extrusion_width", "solid_infill_speed" })
|
||||
get_field(el)->toggle(have_solid_infill);
|
||||
|
||||
|
@ -1384,6 +1399,10 @@ void TabPrint::update()
|
|||
from_u8(PresetHints::recommended_thin_wall_thickness(*m_preset_bundle)));
|
||||
|
||||
Thaw();
|
||||
m_update_cnt--;
|
||||
|
||||
if (m_update_cnt==0)
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
|
||||
void TabPrint::OnActivate()
|
||||
|
@ -1553,6 +1572,7 @@ void TabFilament::update()
|
|||
if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptSLA)
|
||||
return; // ys_FIXME
|
||||
|
||||
m_update_cnt++;
|
||||
Freeze();
|
||||
wxString text = from_u8(PresetHints::cooling_description(m_presets->get_edited_preset()));
|
||||
m_cooling_description_line->SetText(text);
|
||||
|
@ -1567,7 +1587,11 @@ void TabFilament::update()
|
|||
|
||||
for (auto el : { "min_fan_speed", "disable_fan_first_layers" })
|
||||
get_field(el)->toggle(fan_always_on);
|
||||
Thaw();
|
||||
Thaw();
|
||||
m_update_cnt--;
|
||||
|
||||
if (m_update_cnt == 0)
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
|
||||
void TabFilament::OnActivate()
|
||||
|
@ -2241,7 +2265,12 @@ void TabPrinter::update_pages()
|
|||
|
||||
void TabPrinter::update()
|
||||
{
|
||||
m_update_cnt++;
|
||||
m_presets->get_edited_preset().printer_technology() == ptFFF ? update_fff() : update_sla();
|
||||
m_update_cnt--;
|
||||
|
||||
if (m_update_cnt == 0)
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
|
||||
void TabPrinter::update_fff()
|
||||
|
@ -3206,6 +3235,14 @@ void TabSLAMaterial::update()
|
|||
{
|
||||
if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptFFF)
|
||||
return; // #ys_FIXME
|
||||
|
||||
// #ys_FIXME
|
||||
// m_update_cnt++;
|
||||
// ! something to update
|
||||
// m_update_cnt--;
|
||||
//
|
||||
// if (m_update_cnt == 0)
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
|
||||
void TabSLAPrint::build()
|
||||
|
@ -3290,6 +3327,14 @@ void TabSLAPrint::update()
|
|||
{
|
||||
if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptFFF)
|
||||
return; // #ys_FIXME
|
||||
|
||||
// #ys_FIXME
|
||||
// m_update_cnt++;
|
||||
// ! something to update
|
||||
// m_update_cnt--;
|
||||
//
|
||||
// if (m_update_cnt == 0)
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
|
||||
} // GUI
|
||||
|
|
|
@ -204,7 +204,6 @@ protected:
|
|||
void set_type();
|
||||
|
||||
int m_em_unit;
|
||||
std::set<std::string> m_dirty_options;
|
||||
|
||||
public:
|
||||
PresetBundle* m_preset_bundle;
|
||||
|
@ -213,6 +212,11 @@ public:
|
|||
DynamicPrintConfig* m_config;
|
||||
ogStaticText* m_parent_preset_description_line;
|
||||
wxStaticText* m_colored_Label = nullptr;
|
||||
// Counter for the updating (because of an update() function can have a recursive behavior):
|
||||
// 1. increase value from the very beginning of an update() function
|
||||
// 2. decrease value at the end of an update() function
|
||||
// 3. propagate changed configuration to the Platter when (m_update_cnt == 0) only
|
||||
int m_update_cnt = 0;
|
||||
|
||||
public:
|
||||
Tab(wxNotebook* parent, const wxString& title, const char* name);
|
||||
|
@ -284,7 +288,6 @@ protected:
|
|||
void update_frequently_changed_parameters();
|
||||
void fill_icon_descriptions();
|
||||
void set_tooltips_text();
|
||||
bool update_completed() const { return m_dirty_options.empty(); }
|
||||
};
|
||||
|
||||
class TabPrint : public Tab
|
||||
|
|
|
@ -492,7 +492,7 @@ wxDataViewItem PrusaObjectDataViewModel::Add(const wxString &name, const int ext
|
|||
|
||||
wxDataViewItem PrusaObjectDataViewModel::AddVolumeChild(const wxDataViewItem &parent_item,
|
||||
const wxString &name,
|
||||
const int volume_type,
|
||||
const Slic3r::ModelVolumeType volume_type,
|
||||
const int extruder/* = 0*/,
|
||||
const bool create_frst_child/* = true*/)
|
||||
{
|
||||
|
@ -518,7 +518,7 @@ wxDataViewItem PrusaObjectDataViewModel::AddVolumeChild(const wxDataViewItem &pa
|
|||
if (insert_position > 0) insert_position++;
|
||||
}
|
||||
|
||||
const auto node = new PrusaObjectDataViewModelNode(root, name, *m_volume_bmps[volume_type], extruder_str, root->m_volumes_cnt);
|
||||
const auto node = new PrusaObjectDataViewModelNode(root, name, *m_volume_bmps[int(volume_type)], extruder_str, root->m_volumes_cnt);
|
||||
insert_position < 0 ? root->Append(node) : root->Insert(node, insert_position);
|
||||
// notify control
|
||||
const wxDataViewItem child((void*)node);
|
||||
|
@ -1280,13 +1280,13 @@ void PrusaObjectDataViewModel::UpdateSettingsDigest(const wxDataViewItem &item,
|
|||
ItemChanged(item);
|
||||
}
|
||||
|
||||
void PrusaObjectDataViewModel::SetVolumeType(const wxDataViewItem &item, const int type)
|
||||
void PrusaObjectDataViewModel::SetVolumeType(const wxDataViewItem &item, const Slic3r::ModelVolumeType type)
|
||||
{
|
||||
if (!item.IsOk() || GetItemType(item) != itVolume)
|
||||
return;
|
||||
|
||||
PrusaObjectDataViewModelNode *node = (PrusaObjectDataViewModelNode*)item.GetID();
|
||||
node->SetBitmap(*m_volume_bmps[type]);
|
||||
node->SetBitmap(*m_volume_bmps[int(type)]);
|
||||
ItemChanged(item);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
#include <set>
|
||||
#include <functional>
|
||||
|
||||
namespace Slic3r {
|
||||
enum class ModelVolumeType : int;
|
||||
};
|
||||
|
||||
wxMenuItem* append_menu_item(wxMenu* menu, int id, const wxString& string, const wxString& description,
|
||||
std::function<void(wxCommandEvent& event)> cb, const wxBitmap& icon, wxEvtHandler* event_handler = nullptr);
|
||||
wxMenuItem* append_menu_item(wxMenu* menu, int id, const wxString& string, const wxString& description,
|
||||
|
@ -448,7 +452,7 @@ public:
|
|||
wxDataViewItem Add(const wxString &name, const int extruder);
|
||||
wxDataViewItem AddVolumeChild(const wxDataViewItem &parent_item,
|
||||
const wxString &name,
|
||||
const int volume_type,
|
||||
const Slic3r::ModelVolumeType volume_type,
|
||||
const int extruder = 0,
|
||||
const bool create_frst_child = true);
|
||||
wxDataViewItem AddSettingsChild(const wxDataViewItem &parent_item);
|
||||
|
@ -516,7 +520,7 @@ public:
|
|||
void UpdateSettingsDigest(const wxDataViewItem &item, const std::vector<std::string>& categories);
|
||||
|
||||
void SetVolumeBitmaps(const std::vector<wxBitmap*>& volume_bmps) { m_volume_bmps = volume_bmps; }
|
||||
void SetVolumeType(const wxDataViewItem &item, const int type);
|
||||
void SetVolumeType(const wxDataViewItem &item, const Slic3r::ModelVolumeType type);
|
||||
|
||||
void SetAssociatedControl(wxDataViewCtrl* ctrl) { m_ctrl = ctrl; }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue