瀏覽代碼

Do not paint while scaling the brush

luboslenco 6 天之前
父節點
當前提交
fc3b394330
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      paint/sources/brush_nodes/brush_output_node.ts

+ 9 - 0
paint/sources/brush_nodes/brush_output_node.ts

@@ -130,6 +130,15 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 		return;
 	}
 
+	// Do not paint while scaling the brush
+	let brush_scaling: bool = operator_shortcut(map_get(config_keymap, "brush_radius"), shortcut_type_t.DOWN) ||
+		operator_shortcut(map_get(config_keymap, "brush_opacity"), shortcut_type_t.DOWN) ||
+		operator_shortcut(map_get(config_keymap, "brush_angle"), shortcut_type_t.DOWN);
+
+	if (context_raw.brush_locked || brush_scaling) {
+		return;
+	}
+
 	if (!slot_layer_is_visible(context_raw.layer) && !context_raw.paint2d) {
 		return;
 	}