Fixed post-commit compilation problems

This commit is contained in:
YuSanka 2018-08-24 16:20:19 +02:00
parent 8b148a4fe4
commit 90fcdd4e5f
6 changed files with 32 additions and 40 deletions

View file

@ -386,12 +386,12 @@ sub new {
$self->{btn_print}->Hide; $self->{btn_print}->Hide;
$self->{btn_send_gcode}->Hide; $self->{btn_send_gcode}->Hide;
# export_gcode cog_go.png
my %icons = qw( my %icons = qw(
add brick_add.png add brick_add.png
remove brick_delete.png remove brick_delete.png
reset cross.png reset cross.png
arrange bricks.png arrange bricks.png
export_gcode cog_go.png
print arrow_up.png print arrow_up.png
send_gcode arrow_up.png send_gcode arrow_up.png
reslice reslice.png reslice reslice.png
@ -648,6 +648,8 @@ sub new {
$right_sizer->Add($expert_mode_part_sizer, 0, wxEXPAND | wxTOP, 10) if defined $expert_mode_part_sizer; $right_sizer->Add($expert_mode_part_sizer, 0, wxEXPAND | wxTOP, 10) if defined $expert_mode_part_sizer;
$right_sizer->Add($buttons_sizer, 0, wxEXPAND | wxBOTTOM | wxTOP, 10); $right_sizer->Add($buttons_sizer, 0, wxEXPAND | wxBOTTOM | wxTOP, 10);
$right_sizer->Add($info_sizer, 0, wxEXPAND | wxLEFT, 20); $right_sizer->Add($info_sizer, 0, wxEXPAND | wxLEFT, 20);
# Show the box initially, let it be shown after the slicing is finished.
$self->print_info_box_show(0);
$right_sizer->Add($self->{btn_export_gcode}, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 20); $right_sizer->Add($self->{btn_export_gcode}, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 20);
my $hsizer = Wx::BoxSizer->new(wxHORIZONTAL); my $hsizer = Wx::BoxSizer->new(wxHORIZONTAL);
@ -1727,7 +1729,7 @@ sub print_info_box_show {
# return if (!$show && ($scrolled_window_sizer->IsShown(2) == $show)); # return if (!$show && ($scrolled_window_sizer->IsShown(2) == $show));
my $panel = $self->{right_panel}; my $panel = $self->{right_panel};
my $sizer = $self->{info_sizer}; my $sizer = $self->{info_sizer};
return if (!$show && ($sizer->IsShown(2) == $show)); return if (!$sizer || !$show && ($sizer->IsShown(1) == $show));
Slic3r::GUI::set_show_print_info($show); Slic3r::GUI::set_show_print_info($show);
return if (wxTheApp->{app_config}->get("view_mode") eq "simple"); return if (wxTheApp->{app_config}->get("view_mode") eq "simple");
@ -1772,8 +1774,8 @@ sub print_info_box_show {
# $scrolled_window_panel->Layout; # $scrolled_window_panel->Layout;
$sizer->Show(1, $show); $sizer->Show(1, $show);
#? $self->Layout; $self->Layout;
#? $panel->Refresh; $panel->Refresh;
} }
sub do_print { sub do_print {

View file

@ -718,7 +718,7 @@ void SliderCtrl::BUILD()
auto temp = new wxBoxSizer(wxHORIZONTAL); auto temp = new wxBoxSizer(wxHORIZONTAL);
auto def_val = static_cast<ConfigOptionInt*>(m_opt.default_value)->value; auto def_val = static_cast<const ConfigOptionInt*>(m_opt.default_value)->value;
auto min = m_opt.min == INT_MIN ? 0 : m_opt.min; auto min = m_opt.min == INT_MIN ? 0 : m_opt.min;
auto max = m_opt.max == INT_MAX ? 100 : m_opt.max; auto max = m_opt.max == INT_MAX ? 100 : m_opt.max;

View file

@ -2952,12 +2952,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
#endif #endif
} }
else if (evt.Leaving()) else if (evt.Leaving())
{
// to remove hover when mouse goes out of this canvas
m_mouse.position = Pointf((coordf_t)pos.x, (coordf_t)pos.y);
render();
}
else if (evt.Leaving())
{ {
// to remove hover on objects when the mouse goes out of this canvas // to remove hover on objects when the mouse goes out of this canvas
m_mouse.position = Vec2d(-1.0, -1.0); m_mouse.position = Vec2d(-1.0, -1.0);

View file

@ -803,10 +803,6 @@ PresetBundle* get_preset_bundle()
return g_PresetBundle; return g_PresetBundle;
} }
wxNotebook* get_tab_panel() {
return g_wxTabPanel;
}
const wxColour& get_label_clr_modified() { const wxColour& get_label_clr_modified() {
return g_color_label_modified; return g_color_label_modified;
} }
@ -1116,7 +1112,7 @@ void show_buttons(bool show)
if (!tab) if (!tab)
continue; continue;
g_btn_print->Show(show && !tab->m_config->opt_string("serial_port").empty()); g_btn_print->Show(show && !tab->m_config->opt_string("serial_port").empty());
g_btn_send_gcode->Show(show && !tab->m_config->opt_string("octoprint_host").empty()); g_btn_send_gcode->Show(show && !tab->m_config->opt_string("print_host").empty());
break; break;
} }
} }

View file

@ -35,8 +35,8 @@ wxSlider* m_mover_y = nullptr;
wxSlider* m_mover_z = nullptr; wxSlider* m_mover_z = nullptr;
wxButton* m_btn_move_up = nullptr; wxButton* m_btn_move_up = nullptr;
wxButton* m_btn_move_down = nullptr; wxButton* m_btn_move_down = nullptr;
Point3 m_move_options; Vec3d m_move_options;
Point3 m_last_coords; Vec3d m_last_coords;
int m_selected_object_id = -1; int m_selected_object_id = -1;
bool g_prevent_list_events = false; // We use this flag to avoid circular event handling Select() bool g_prevent_list_events = false; // We use this flag to avoid circular event handling Select()
@ -387,12 +387,12 @@ void update_after_moving()
if (volume_id < 0) if (volume_id < 0)
return; return;
Point3 m = m_move_options; Vec3d m = m_move_options;
Point3 l = m_last_coords; Vec3d l = m_last_coords;
auto d = Pointf3(m.x - l.x, m.y - l.y, m.z - l.z); auto d = Vec3d(m(0) - l(0), m(1) - l(1), m(2) - l(2));
auto volume = (*m_objects)[m_selected_object_id]->volumes[volume_id]; auto volume = (*m_objects)[m_selected_object_id]->volumes[volume_id];
volume->mesh.translate(d.x,d.y,d.z); volume->mesh.translate(d(0), d(1), d(2));
m_last_coords = m; m_last_coords = m;
m_parts_changed = true; m_parts_changed = true;
@ -407,17 +407,17 @@ wxSizer* object_movers(wxWindow *win)
optgroup->m_on_change = [](t_config_option_key opt_key, boost::any value){ optgroup->m_on_change = [](t_config_option_key opt_key, boost::any value){
int val = boost::any_cast<int>(value); int val = boost::any_cast<int>(value);
bool update = false; bool update = false;
if (opt_key == "x" && m_move_options.x != val){ if (opt_key == "x" && m_move_options(0) != val){
update = true; update = true;
m_move_options.x = val; m_move_options(0) = val;
} }
else if (opt_key == "y" && m_move_options.y != val){ else if (opt_key == "y" && m_move_options(1) != val){
update = true; update = true;
m_move_options.y = val; m_move_options(1) = val;
} }
else if (opt_key == "z" && m_move_options.z != val){ else if (opt_key == "z" && m_move_options(2) != val){
update = true; update = true;
m_move_options.z = val; m_move_options(2) = val;
} }
if (update) update_after_moving(); if (update) update_after_moving();
}; };
@ -448,8 +448,8 @@ wxSizer* object_movers(wxWindow *win)
m_sizer_object_movers = optgroup->sizer; m_sizer_object_movers = optgroup->sizer;
m_sizer_object_movers->Show(false); m_sizer_object_movers->Show(false);
m_move_options = Point3(0, 0, 0); m_move_options = Vec3d(0, 0, 0);
m_last_coords = Point3(0, 0, 0); m_last_coords = Vec3d(0, 0, 0);
return optgroup->sizer; return optgroup->sizer;
} }
@ -1122,9 +1122,9 @@ void load_part( wxWindow* parent, ModelObject* model_object,
part_names.Add(new_volume->name); part_names.Add(new_volume->name);
// apply the same translation we applied to the object // apply the same translation we applied to the object
new_volume->mesh.translate( model_object->origin_translation.x, new_volume->mesh.translate( model_object->origin_translation(0),
model_object->origin_translation.y, model_object->origin_translation(1),
model_object->origin_translation.y ); model_object->origin_translation(2) );
// set a default extruder value, since user can't add it manually // set a default extruder value, since user can't add it manually
new_volume->config.set_key_value("extruder", new ConfigOptionInt(0)); new_volume->config.set_key_value("extruder", new ConfigOptionInt(0));
@ -1162,9 +1162,9 @@ void load_lambda( wxWindow* parent, ModelObject* model_object,
break;} break;}
case LambdaTypeSlab:{ case LambdaTypeSlab:{
const auto& size = model_object->bounding_box().size(); const auto& size = model_object->bounding_box().size();
mesh = make_cube(size.x*1.5, size.y*1.5, params.slab_h); mesh = make_cube(size(0)*1.5, size(1)*1.5, params.slab_h);
// box sets the base coordinate at 0, 0, move to center of plate and move it up to initial_z // box sets the base coordinate at 0, 0, move to center of plate and move it up to initial_z
mesh.translate(-size.x*1.5 / 2.0, -size.y*1.5 / 2.0, params.slab_z); mesh.translate(-size(0)*1.5 / 2.0, -size(1)*1.5 / 2.0, params.slab_z);
name += "Slab"; name += "Slab";
break; } break; }
default: default:
@ -1514,7 +1514,7 @@ void update_scale_values()
(*m_objects)[m_selected_object_id]->instances[0]->scaling_factor); (*m_objects)[m_selected_object_id]->instances[0]->scaling_factor);
} }
void update_scale_values(const Pointf3& size, float scaling_factor) void update_scale_values(const Vec3d& size, float scaling_factor)
{ {
auto og = get_optgroup(ogFrequentlyObjectSettings); auto og = get_optgroup(ogFrequentlyObjectSettings);
@ -1525,9 +1525,9 @@ void update_scale_values(const Pointf3& size, float scaling_factor)
og->set_value("scale_z", int(scale)); og->set_value("scale_z", int(scale));
} }
else { else {
og->set_value("scale_x", int(size.x + 0.5)); og->set_value("scale_x", int(size(0) + 0.5));
og->set_value("scale_y", int(size.y + 0.5)); og->set_value("scale_y", int(size(1) + 0.5));
og->set_value("scale_z", int(size.z + 0.5)); og->set_value("scale_z", int(size(2) + 0.5));
} }
} }

View file

@ -108,7 +108,7 @@ void set_extruder_column_hidden(bool hide);
void update_extruder_in_config(const wxString& selection); void update_extruder_in_config(const wxString& selection);
// update scale values after scale unit changing or "gizmos" // update scale values after scale unit changing or "gizmos"
void update_scale_values(); void update_scale_values();
void update_scale_values(const Pointf3& size, float scale); void update_scale_values(const Vec3d& size, float scale);
// update rotation values object selection changing // update rotation values object selection changing
void update_rotation_values(); void update_rotation_values();
// update rotation value after "gizmos" // update rotation value after "gizmos"