Eraser tool works with events

This commit is contained in:
Yousef Khadadeh 2026-03-03 12:06:48 +03:00
parent 803eb2c08a
commit 6effc6de56
3 changed files with 77 additions and 50 deletions

View file

@ -32,8 +32,7 @@ void LineDrawTool::input_mouse_button_on_canvas_callback(const InputManager::Mou
if(button.down && drawP.layerMan.is_a_layer_being_edited() && !objInfoBeingEdited) {
auto relativeWidthResult = drawP.world.main.toolConfig.get_relative_width_stroke_size(drawP, drawP.world.drawData.cam.c.inverseScale);
if(!relativeWidthResult.first.has_value()) {
if(drawP.controls.leftClick)
drawP.world.main.toolConfig.print_relative_width_fail_message(relativeWidthResult.second);
drawP.world.main.toolConfig.print_relative_width_fail_message(relativeWidthResult.second);
return;
}
float width = relativeWidthResult.first.value();