fix phantom empty top print layer

This commit is contained in:
Stewart Allen 2017-11-03 15:56:32 -04:00
commit 5532e91080

View file

@ -661,9 +661,10 @@ self.kiri.license = exports.LICENSE;
} else { } else {
forWidgets(function(widget) { forWidgets(function(widget) {
if (!widget.slices) return; if (!widget.slices) return;
max = Math.max(max, widget.slices.length - 1); max = Math.max(max, widget.slices.length);
}); });
} }
max = Math.max(0, max - 1);
showLayerMax = max; showLayerMax = max;
if (UI.layerID.convert() > max || showLayerValue > max) { if (UI.layerID.convert() > max || showLayerValue > max) {
showLayerValue = max; showLayerValue = max;