Apply checkstyle

This commit is contained in:
Lubos Lenco
2021-06-25 10:51:51 +02:00
parent ec6790c678
commit 119edd0c3d
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -415,7 +415,7 @@ class LayerSlot {
return texpaint != null && texpaint_nor == null;
}
public function canMove(to : Int): Bool {
public function canMove(to: Int): Bool {
var i = Project.layers.indexOf(this);
var delta = to - i;
if (i + delta < 0 || i + delta > Project.layers.length - 1 || delta == 0) return false;
@@ -464,8 +464,9 @@ class LayerSlot {
}
public function move(to: Int) {
if (!canMove(to))
if (!canMove(to)) {
return;
}
var i = Project.layers.indexOf(this);
var delta = to - i;
@@ -482,7 +483,6 @@ class LayerSlot {
var kIsLayer = k < Project.layers.length ? Project.layers[k].isLayer() : false;
var kLayer = k < Project.layers.length ? Project.layers[k] : null;
if (kIsGroup && !kLayer.show_panel) {
delta -= kLayer.getChildren().length;
}
+1 -1
View File
@@ -207,7 +207,7 @@ class TabLayers {
var nestedGroup = App.dragLayer.isGroup() && toGroup;
if (!nestedGroup) {
if (Context.layer.canMove(Context.dragDestination)) {
ui.fill(checkw, step * 2, (ui._windowW / ui.SCALE() - 2) - checkw, 2 * ui.SCALE(), ui.t.HIGHLIGHT_COL);
ui.fill(checkw, step * 2, (ui._windowW / ui.SCALE() - 2) - checkw, 2 * ui.SCALE(), ui.t.HIGHLIGHT_COL);
}
else {
ui.fill(checkw, step * 2, (ui._windowW / ui.SCALE() - 2) - checkw, 2 * ui.SCALE(), ui.t.ACCENT_HOVER_COL);