Merge branch 'dev' of https://github.com/prusa3d/Slic3r into dev
This commit is contained in:
commit
083a395078
@ -607,11 +607,12 @@ sub new {
|
||||
#$self->{object_info_manifold_warning_icon}->Hide;
|
||||
$self->{"object_info_manifold_warning_icon_show"} = sub {
|
||||
if ($self->{object_info_manifold_warning_icon}->IsShown() != $_[0]) {
|
||||
# this fuction show/hide info_manifold_warning_icon on the c++ side now
|
||||
Slic3r::GUI::set_show_manifold_warning_icon($_[0]);
|
||||
my $mode = wxTheApp->{app_config}->get("view_mode");
|
||||
return if ($mode eq "" || $mode eq "simple");
|
||||
$self->{object_info_manifold_warning_icon}->Show($_[0]);
|
||||
$self->Layout
|
||||
#my $mode = wxTheApp->{app_config}->get("view_mode");
|
||||
#return if ($mode eq "" || $mode eq "simple");
|
||||
#$self->{object_info_manifold_warning_icon}->Show($_[0]);
|
||||
#$self->Layout
|
||||
}
|
||||
};
|
||||
$self->{"object_info_manifold_warning_icon_show"}->(0);
|
||||
@ -2478,11 +2479,11 @@ sub select_object {
|
||||
if (defined $obj_idx) {
|
||||
$self->{objects}->[$obj_idx]->selected(1);
|
||||
# Select current object in the list on c++ side, if item isn't child
|
||||
if (!defined $child){
|
||||
Slic3r::GUI::select_current_object($obj_idx);}
|
||||
# if (!defined $child){
|
||||
# Slic3r::GUI::select_current_object($obj_idx);} # all selections in the object list is on c++ side
|
||||
} else {
|
||||
# Unselect all objects in the list on c++ side
|
||||
Slic3r::GUI::unselect_objects();
|
||||
# Slic3r::GUI::unselect_objects(); # all selections in the object list is on c++ side
|
||||
}
|
||||
$self->selection_changed(1);
|
||||
}
|
||||
|
@ -259,6 +259,15 @@ void set_show_print_info(bool show)
|
||||
void set_show_manifold_warning_icon(bool show)
|
||||
{
|
||||
g_show_manifold_warning_icon = show;
|
||||
if (!g_manifold_warning_icon)
|
||||
return;
|
||||
|
||||
// update manifold_warning_icon showing
|
||||
if (show && !g_info_sizer->IsShown(static_cast<size_t>(0)))
|
||||
g_show_manifold_warning_icon = false;
|
||||
|
||||
g_manifold_warning_icon->Show(g_show_manifold_warning_icon);
|
||||
g_manifold_warning_icon->GetParent()->Layout();
|
||||
}
|
||||
|
||||
void set_objects_list_sizer(wxBoxSizer *objects_list_sizer){
|
||||
@ -1118,11 +1127,11 @@ void show_buttons(bool show)
|
||||
}
|
||||
}
|
||||
|
||||
void show_info_sizer(const bool show, const bool is_update_settings/* = false*/)
|
||||
void show_info_sizer(const bool show)
|
||||
{
|
||||
g_info_sizer->Show(static_cast<size_t>(0), show);
|
||||
g_info_sizer->Show(1, show && g_show_print_info);
|
||||
g_manifold_warning_icon->Show(show && (!is_update_settings && g_show_manifold_warning_icon));
|
||||
g_manifold_warning_icon->Show(show && g_show_manifold_warning_icon);
|
||||
}
|
||||
|
||||
void show_object_name(bool show)
|
||||
@ -1142,6 +1151,7 @@ void update_mode()
|
||||
show_info_sizer(mode == ConfigMenuModeExpert);
|
||||
show_buttons(mode == ConfigMenuModeExpert);
|
||||
show_object_name(mode == ConfigMenuModeSimple);
|
||||
show_manipulation_sizer(mode == ConfigMenuModeSimple);
|
||||
|
||||
// TODO There is a not the best place of it!
|
||||
// *** Update showing of the collpane_settings
|
||||
|
@ -182,7 +182,7 @@ bool select_language(wxArrayString & names, wxArrayLong & identifiers);
|
||||
// update right panel of the Plater according to view mode
|
||||
void update_mode();
|
||||
|
||||
void show_info_sizer(const bool show, const bool is_update_settinfs = false);
|
||||
void show_info_sizer(const bool show);
|
||||
|
||||
std::vector<Tab *>& get_tabs_list();
|
||||
bool checked_tab(Tab* tab);
|
||||
|
@ -731,11 +731,8 @@ void select_current_object(int idx)
|
||||
{
|
||||
g_prevent_list_events = true;
|
||||
m_objects_ctrl->UnselectAll();
|
||||
if (idx < 0) {
|
||||
g_prevent_list_events = false;
|
||||
return;
|
||||
}
|
||||
m_objects_ctrl->Select(m_objects_model->GetItemById(idx));
|
||||
if (idx>=0)
|
||||
m_objects_ctrl->Select(m_objects_model->GetItemById(idx));
|
||||
part_selection_changed();
|
||||
g_prevent_list_events = false;
|
||||
}
|
||||
@ -748,12 +745,8 @@ void select_current_volume(int idx, int vol_idx)
|
||||
}
|
||||
g_prevent_list_events = true;
|
||||
m_objects_ctrl->UnselectAll();
|
||||
if (idx < 0) {
|
||||
g_prevent_list_events = false;
|
||||
return;
|
||||
}
|
||||
|
||||
m_objects_ctrl->Select(m_objects_model->GetItemByVolumeId(idx, vol_idx));
|
||||
if (idx >= 0)
|
||||
m_objects_ctrl->Select(m_objects_model->GetItemByVolumeId(idx, vol_idx));
|
||||
part_selection_changed();
|
||||
g_prevent_list_events = false;
|
||||
}
|
||||
@ -1186,8 +1179,8 @@ wxMenu *create_add_settings_popupmenu(bool is_part)
|
||||
menu->Append(menu_item);
|
||||
}
|
||||
#ifndef __WXMSW__
|
||||
menu->Bind(wxEVT_MENU, [menu](wxEvent &event) {
|
||||
get_settings_choice(menu, event.GetId(), true);
|
||||
menu->Bind(wxEVT_MENU, [menu,is_part](wxEvent &event) {
|
||||
get_settings_choice(menu, event.GetId(), is_part);
|
||||
});
|
||||
#endif //no __WXMSW__
|
||||
return menu;
|
||||
@ -2033,5 +2026,17 @@ void update_double_slider_from_canvas(wxKeyEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void show_manipulation_sizer(const bool is_simple_mode)
|
||||
{
|
||||
auto item = m_objects_ctrl->GetSelection();
|
||||
if (!item || !is_simple_mode)
|
||||
return;
|
||||
|
||||
if (m_objects_model->IsSettingsItem(item)) {
|
||||
m_objects_ctrl->Select(m_objects_model->GetParent(item));
|
||||
part_selection_changed();
|
||||
}
|
||||
}
|
||||
|
||||
} //namespace GUI
|
||||
} //namespace Slic3r
|
@ -140,6 +140,8 @@ void reset_double_slider();
|
||||
// update DoubleSlider after keyDown in canvas
|
||||
void update_double_slider_from_canvas(wxKeyEvent& event);
|
||||
|
||||
void show_manipulation_sizer(const bool is_simple_mode);
|
||||
|
||||
} //namespace GUI
|
||||
} //namespace Slic3r
|
||||
#endif //slic3r_GUI_ObjectParts_hpp_
|
Loading…
Reference in New Issue
Block a user