Skip to content
Snippets Groups Projects

Add automatic addConstrainedBy() in establishConstraints() ...

Merged Joan Solà Ortega requested to merge feature/improve_trackers into devel
  • Rename some feature lists for easier reading

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
151 auto constraint = createConstraint(feature_in_last, feature_in_origin);
152 feature_in_last ->addConstraint(constraint);
153 feature_in_origin->addConstrainedBy(constraint);
151 auto ctr_ptr = createConstraint(feature_in_last, feature_in_origin);
152 feature_in_last ->addConstraint(ctr_ptr);
153 feature_in_origin->addConstrainedBy(ctr_ptr);
154
155 if (ctr_ptr != nullptr) // constraint links
156 {
157 FrameBasePtr frm = ctr_ptr->getFrameOtherPtr();
158 if (frm)
159 frm->addConstrainedBy(ctr_ptr);
160 CaptureBasePtr cap = ctr_ptr->getCaptureOtherPtr();
161 if (cap)
162 cap->addConstrainedBy(ctr_ptr);
163 }
  • I don't see why is it necessary. Actually we should call addConstrainedBy only for those wolf nodes really constrained by any constraint. This functionality is necessary in order to remove the corresponding constraints in case a node is removed.

    In this case, the "constrainedBy" node is a feature. So the frame and capture containing this feature does not need to have the constraint in their respective constrainedBy list since when they are removed, the feature will also be removed and then, the constraint.

  • Please register or sign in to reply
Please register or sign in to reply
Loading