Apply checkstyle
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user