Only draw caches owned by the cache object are checked

This commit is contained in:
Yousef Khadadeh 2025-08-12 20:10:09 +03:00
parent e5e885794a
commit 1f412a0046
2 changed files with 9 additions and 5 deletions

View file

@ -26,7 +26,7 @@ void EraserTool::switch_tool(DrawingProgramToolType newTool) {
// NOTE: Ideally, you would just recalculate the lastDrawnPos of every cache instead of invalidating and redrawing the caches
// However, the eraser might have other visual glitches during drawing that i am unaware of, so for now, just refresh the
// cache after a draw
drawP.compCache.invalidate_cache_before_pos(0);
drawP.compCache.clear_own_cached_surfaces();
}
erasedComponents.clear();
erasedBVHNodes.clear();