From 5fd3cc267686c74e422a013e62bbae6aea588678 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 17 Jun 2019 13:46:56 +0200 Subject: [PATCH] Select edited layer after changing instead of "Layers" selection, if editing was in "Layer" mode --- src/slic3r/GUI/GUI_ObjectList.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 1d7d95b56..5539ee29a 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -2486,6 +2486,8 @@ bool ObjectList::edit_layer_range(const t_layer_height_range& range, const t_lay const int obj_idx = get_selected_obj_idx(); if (obj_idx < 0) return false; + const ItemType sel_type = m_objects_model->GetItemType(GetSelection()); + t_layer_config_ranges& ranges = object(obj_idx)->layer_config_ranges; const DynamicPrintConfig config = ranges[range]; @@ -2501,8 +2503,7 @@ bool ObjectList::edit_layer_range(const t_layer_height_range& range, const t_lay for (const auto r : ranges) add_layer_item(r.first, root_item); - // To update(recreate) layers sizer call select_item for LayerRoot item expand - select_item(root_item); + select_item(sel_type&itLayer ? m_objects_model->GetItemByLayerRange(obj_idx, new_range) : root_item); Expand(root_item); return true;