Fixed a cache update glitch in eraser tool after erasing is done
This commit is contained in:
parent
b34a76ace3
commit
e5e885794a
1 changed files with 4 additions and 0 deletions
|
|
@ -23,6 +23,10 @@ void EraserTool::switch_tool(DrawingProgramToolType newTool) {
|
||||||
if(!erasedComponents.empty()) {
|
if(!erasedComponents.empty()) {
|
||||||
DrawingProgramCache::move_components_from_bvh_nodes_to_set(erasedComponents, erasedBVHNodes);
|
DrawingProgramCache::move_components_from_bvh_nodes_to_set(erasedComponents, erasedBVHNodes);
|
||||||
drawP.client_erase_set(erasedComponents);
|
drawP.client_erase_set(erasedComponents);
|
||||||
|
// 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);
|
||||||
}
|
}
|
||||||
erasedComponents.clear();
|
erasedComponents.clear();
|
||||||
erasedBVHNodes.clear();
|
erasedBVHNodes.clear();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue