Skip to content

Commit

Permalink
ENH: select a volume in assembly view can enter painting
Browse files Browse the repository at this point in the history
In assembly view, default selection is volume and painting needs an
object. It's inconvenient to select a full object to get in painting.

Jira: STUDIO-3322

Change-Id: I980e5a3ca7a9c5cf2800f28a38c1c68b978a343b
  • Loading branch information
LiZ-Li-BBL authored and lanewei120 committed Nov 1, 2023
1 parent 76f3f22 commit 1e99ce9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ bool GLGizmoMmuSegmentation::on_is_selectable() const

bool GLGizmoMmuSegmentation::on_is_activable() const
{
return GLGizmoPainterBase::on_is_activable() && wxGetApp().filaments_cnt() > 1;
const Selection& selection = m_parent.get_selection();
return !selection.is_empty() && (selection.is_single_full_instance() || selection.is_any_volume()) && wxGetApp().filaments_cnt() > 1;
}

//BBS: use the global one in 3DScene.cpp
Expand Down
4 changes: 3 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ bool CommonGizmosDataPool::check_dependencies(CommonGizmosDataID required) const
void SelectionInfo::on_update()
{
const Selection& selection = get_pool()->get_canvas()->get_selection();
if (selection.is_single_full_instance()) {
// BBS still keep object pointer when selection is volume
//if (selection.is_single_full_instance()) {
if (!selection.is_empty()) {
m_model_object = selection.get_model()->objects[selection.get_object_idx()];
m_z_shift = selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z();
}
Expand Down

0 comments on commit 1e99ce9

Please sign in to comment.