Commit fceeb28d authored by Nathan Lee's avatar Nathan Lee

Fix hang selecting path referenced by pattern along path

See #1517
(cherry-picked from 768e853d)
parent b51213c2
Pipeline #177027753 passed with stages
in 87 minutes and 34 seconds
......@@ -139,7 +139,7 @@ MultiPathManipulator::~MultiPathManipulator()
void MultiPathManipulator::cleanup()
{
for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ) {
if (i->second->empty()) _mmap.erase(i++);
if (i->second->empty()) i = _mmap.erase(i);
else ++i;
}
}
......@@ -158,7 +158,7 @@ void MultiPathManipulator::setItems(std::set<ShapeRecord> const &s)
std::set<ShapeRecord>::iterator si = shapes.find(i->first);
if (si == shapes.end()) {
// This item is no longer supposed to be edited - remove its manipulator
_mmap.erase(i++);
i = _mmap.erase(i);
} else {
ShapeRecord const &sr = i->first;
ShapeRecord const &sr_new = *si;
......@@ -172,11 +172,12 @@ void MultiPathManipulator::setItems(std::set<ShapeRecord> const &s)
if (sr.role != sr_new.role) {
//hold->setOutlineColor(_getOutlineColor(sr_new.role));
}
_mmap.erase(sr);
i = _mmap.erase(i);
_mmap.insert(std::make_pair(sr_new, hold));
} else {
++i;
}
shapes.erase(si); // remove the processed record
++i;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment