Skip to content

Commit

Permalink
revert changes to tvectorimage
Browse files Browse the repository at this point in the history
  • Loading branch information
pojienie committed Jun 27, 2020
1 parent a820986 commit 84e9ef9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions toonz/sources/common/tvectorimage/tvectorimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,8 @@ bool TVectorImage::Imp::areWholeGroups(const std::vector<int> &indexes) const {
if (!m_strokes[indexes[i]]->m_groupId.isGrouped()) return false;
for (j = 0; j < m_strokes.size(); j++) {
int ret = areDifferentGroup(indexes[i], false, j, false);
if (ret == -1 || (ret >= 1 && find(indexes.begin(), indexes.end(), j) ==
indexes.end()))
if (ret == -1 ||
(ret >= 1 && find(indexes.begin(), indexes.end(), j) == indexes.end()))
return false;
}
}
Expand Down Expand Up @@ -1282,7 +1282,7 @@ void TVectorImage::mergeImage(const TVectorImageP &img, const TAffine &affine,
} else {
img->m_imp->m_strokes[i]->m_groupId =
TGroupId(groupId, img->m_imp->m_strokes[i]->m_groupId);
}
}
}
}
}
Expand Down Expand Up @@ -2154,8 +2154,7 @@ VIStroke *TVectorImage::Imp::joinStroke(int index1, int index2, int cpIndex1,

// check if the both ends are at the same postion
bool isSamePos = isAlmostZero(tdistance2(stroke1->getControlPoint(cpIndex1),
stroke2->getControlPoint(cpIndex2)),
1e-4);
stroke2->getControlPoint(cpIndex2)));
// connecting the ends in the same shape at the same postion
// means just making the shape self-looped
if (isSamePos && index1 == index2) {
Expand Down Expand Up @@ -2909,7 +2908,7 @@ void TVectorImage::Imp::regroupGhosts(std::vector<int> &changedStrokes) {
((currGroupId.isGrouped(false) != 0 &&
m_strokes[i]->m_groupId == currGroupId) ||
(currGroupId.isGrouped(true) != 0 &&
m_strokes[i]->m_groupId.isGrouped(true) != 0))) {
m_strokes[i]->m_groupId.isGrouped(true) != 0))) {
if (m_strokes[i]->m_groupId != currGroupId) {
m_strokes[i]->m_groupId = currGroupId;
changedStrokes.push_back(i);
Expand Down

0 comments on commit 84e9ef9

Please sign in to comment.