Prevent undo and redo at points when they might break the program
This commit is contained in:
parent
f606fc6fc1
commit
2de5c90006
21 changed files with 79 additions and 2 deletions
|
|
@ -107,6 +107,10 @@ void EraserTool::tool_update() {
|
|||
reset_tool();
|
||||
}
|
||||
|
||||
bool EraserTool::prevent_undo_or_redo() {
|
||||
return drawP.controls.leftClickHeld;
|
||||
}
|
||||
|
||||
void EraserTool::draw(SkCanvas* canvas, const DrawData& drawData) {
|
||||
if(!drawData.main->toolbar.io->hoverObstructed) {
|
||||
SkColor4f c = drawP.world.main.canvasTheme.toolFrontColor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue