Use brush ruler to draw lines

This commit is contained in:
luboslenco
2019-11-17 17:42:28 +01:00
parent e38fcfc97e
commit fa8ea98eeb
2 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -60,9 +60,10 @@ class BrushOutputNode extends LogicNode {
!arm.App.isResizing &&
@:privateAccess UITrait.inst.ui.comboSelectedHandle == null &&
@:privateAccess UIView2D.inst.ui.comboSelectedHandle == null) { // Header combos are in use
// Set color pick
var down = iron.system.Input.getMouse().down() || iron.system.Input.getPen().down();
if (Context.tool == ToolColorId && Project.assets.length > 0 && down) {
if (down && Context.tool == ToolColorId && Project.assets.length > 0) {
UITrait.inst.colorIdPicked = true;
}
// Prevent painting the same spot
+7
View File
@@ -657,6 +657,13 @@ class UITrait {
!App.isDragging &&
!App.isResizing &&
@:privateAccess ui.comboSelectedHandle == null) { // Paint started
// Draw line
if (Operator.shortcut(Config.keymap.brush_ruler + "+" + Config.keymap.action_paint)) {
lastPaintVecX = lastPaintX;
lastPaintVecY = lastPaintY;
}
History.pushUndo = true;
if (Context.tool == ToolClone && cloneStartX >= 0.0) { // Clone delta
cloneDeltaX = (cloneStartX - mx) / iron.App.w();