ENH: select a volume in assembly view can enter painting
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
This commit is contained in:
parent
76f3f22bcc
commit
1e99ce9535
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue