Cura/plugins/LayerView/LayerView.qml
Arjen Hiemstra d9ad54cd0d Rescale the current layer number based on the maximum layer
This makes sure we still have the top layer selected when we
receive new data.

Contributes to Asana issue 34806173176751
2015-06-08 16:31:38 +02:00

32 lines
637 B
QML

// Copyright (c) 2015 Ultimaker B.V.
// Cura is released under the terms of the AGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM
Item
{
width: 250
height: 250
Slider
{
width: 10
height: 250
anchors.right : parent.right
orientation: Qt.Vertical
minimumValue: 0;
maximumValue: UM.LayerView.numLayers;
stepSize: 1
value: UM.LayerView.currentLayer
onValueChanged: UM.LayerView.setCurrentLayer(value)
style: UM.Theme.styles.slider;
}
}