diff --git a/toonz/sources/tnztools/vectorerasertool.cpp b/toonz/sources/tnztools/vectorerasertool.cpp index 2155597..766a7a0 100644 --- a/toonz/sources/tnztools/vectorerasertool.cpp +++ b/toonz/sources/tnztools/vectorerasertool.cpp @@ -1262,6 +1262,7 @@ void EraserTool::eraseSegments(const TVectorImageP vi, TStroke *eraseStroke) { if (!vi || !eraseStroke) return; int strokeNumber = vi->getStrokeCount(); + int colorStyle = TTool::getApplication()->getCurrentLevelStyleIndex(); std::vector touchedStrokeIndex; std::vector> touchedStrokeW; std::vector> touchedStrokeRanges; @@ -1273,6 +1274,10 @@ void EraserTool::eraseSegments(const TVectorImageP vi, TStroke *eraseStroke) { TStroke *stroke = vi->getStroke(i); bool touched = false; + if (m_selective.getValue() && stroke->getStyle() != colorStyle) { + continue; + } + intersect(eraseStroke, stroke, intersections, false); for (auto &intersection : intersections) {