Cut: Fixes and improvements for object's context menu
* Disable or delete some menu items, which are inappropriate for cut objects * For cut objects added menu item "Invalidate cut info" to disconnect related cut parts of initial object * If just one part is kept after cut performance, than don't apply a cut info for this object. + CutGizmo: Fixed selection of the mode An object has connectors -> Connectors mode An object doesn't has connectors -> CutPlane mode
This commit is contained in:
parent
74a32e3261
commit
85af9b93f1
10 changed files with 84 additions and 19 deletions
|
@ -1261,7 +1261,9 @@ void ModelObject::invalidate_cut()
|
|||
{
|
||||
for (ModelObject* obj : m_model->objects)
|
||||
if (obj != this && obj->cut_id.is_equal(this->cut_id))
|
||||
obj->cut_id.ivalidate();
|
||||
obj->cut_id.invalidate();
|
||||
// invalidate own cut_id
|
||||
this->cut_id.invalidate();
|
||||
}
|
||||
|
||||
void ModelObject::synchronize_model_after_cut()
|
||||
|
@ -1276,6 +1278,10 @@ void ModelObject::synchronize_model_after_cut()
|
|||
|
||||
void ModelObject::apply_cut_attributes(ModelObjectCutAttributes attributes)
|
||||
{
|
||||
// we don't save cut information, if result will not contains all parts of initial object
|
||||
if (!attributes.has(ModelObjectCutAttribute::KeepUpper) || !attributes.has(ModelObjectCutAttribute::KeepLower))
|
||||
return;
|
||||
|
||||
if (cut_id.id().invalid())
|
||||
cut_id.init();
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
void ivalidate() {
|
||||
void invalidate() {
|
||||
set_invalid_id();
|
||||
m_check_sum = 1;
|
||||
m_connectors_cnt = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue