Merge remote-tracking branch 'origin/master' into ys_printable_property
This commit is contained in:
commit
02324becdb
2 changed files with 26 additions and 14 deletions
src/slic3r/GUI
|
@ -798,17 +798,19 @@ void ObjectList::show_context_menu()
|
|||
|
||||
void ObjectList::copy()
|
||||
{
|
||||
if (m_selection_mode & smLayer)
|
||||
fill_layer_config_ranges_cache();
|
||||
else
|
||||
// if (m_selection_mode & smLayer)
|
||||
// fill_layer_config_ranges_cache();
|
||||
// else {
|
||||
// m_layer_config_ranges_cache.clear();
|
||||
wxPostEvent((wxEvtHandler*)wxGetApp().plater()->canvas3D()->get_wxglcanvas(), SimpleEvent(EVT_GLTOOLBAR_COPY));
|
||||
// }
|
||||
}
|
||||
|
||||
void ObjectList::paste()
|
||||
{
|
||||
if (!m_layer_config_ranges_cache.empty())
|
||||
paste_layers_into_list();
|
||||
else
|
||||
// if (!m_layer_config_ranges_cache.empty())
|
||||
// paste_layers_into_list();
|
||||
// else
|
||||
wxPostEvent((wxEvtHandler*)wxGetApp().plater()->canvas3D()->get_wxglcanvas(), SimpleEvent(EVT_GLTOOLBAR_PASTE));
|
||||
}
|
||||
|
||||
|
@ -2809,7 +2811,8 @@ void ObjectList::update_selections_on_canvas()
|
|||
|
||||
std::vector<unsigned int> volume_idxs;
|
||||
Selection::EMode mode = Selection::Volume;
|
||||
auto add_to_selection = [this, &volume_idxs](const wxDataViewItem& item, const Selection& selection, int instance_idx, Selection::EMode& mode)
|
||||
bool single_selection = sel_cnt == 1;
|
||||
auto add_to_selection = [this, &volume_idxs, &single_selection](const wxDataViewItem& item, const Selection& selection, int instance_idx, Selection::EMode& mode)
|
||||
{
|
||||
const ItemType& type = m_objects_model->GetItemType(item);
|
||||
const int obj_idx = m_objects_model->GetObjectIdByItem(item);
|
||||
|
@ -2828,6 +2831,7 @@ void ObjectList::update_selections_on_canvas()
|
|||
else
|
||||
{
|
||||
mode = Selection::Instance;
|
||||
single_selection = false;
|
||||
std::vector<unsigned int> idxs = selection.get_volume_idxs_from_object(obj_idx);
|
||||
volume_idxs.insert(volume_idxs.end(), idxs.begin(), idxs.end());
|
||||
}
|
||||
|
@ -2869,7 +2873,7 @@ void ObjectList::update_selections_on_canvas()
|
|||
// add
|
||||
volume_idxs = selection.get_unselected_volume_idxs_from(volume_idxs);
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Selection-Add from list")));
|
||||
selection.add_volumes(mode, volume_idxs, sel_cnt == 1);
|
||||
selection.add_volumes(mode, volume_idxs, single_selection);
|
||||
}
|
||||
|
||||
wxGetApp().plater()->canvas3D()->update_gizmos_on_off_state();
|
||||
|
@ -2934,6 +2938,7 @@ void ObjectList::select_item_all_children()
|
|||
// update selection mode for non-multiple selection
|
||||
void ObjectList::update_selection_mode()
|
||||
{
|
||||
m_selected_layers_range_idx=-1;
|
||||
// All items are unselected
|
||||
if (!GetSelection())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue