mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
Fix some code style
Contributes to issue CURA-5784.
This commit is contained in:
parent
a861b88de1
commit
bb75821599
3 changed files with 28 additions and 22 deletions
|
|
@ -11,9 +11,9 @@ import Cura 1.0 as Cura
|
|||
|
||||
import "../components"
|
||||
|
||||
// This item contains the views selector, a combobox that is dinamically created from
|
||||
// the list of available Views (packages that create different visualizactions of the
|
||||
// scene. Aside the selector, there is a row of buttons that change the orientation of the view.
|
||||
// This item contains the views selector, a combobox that is dynamically created from
|
||||
// the list of available Views (packages that create different visualizations of the
|
||||
// scene). Aside from the selector, there is a row of buttons that change the orientation of the view.
|
||||
Item
|
||||
{
|
||||
id: applicationViewsSelector
|
||||
|
|
@ -25,7 +25,8 @@ Item
|
|||
{
|
||||
id: viewModeButton
|
||||
|
||||
anchors {
|
||||
anchors
|
||||
{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
|
@ -51,15 +52,16 @@ Item
|
|||
{
|
||||
for (var i = 0; i < model.rowCount(); i++)
|
||||
{
|
||||
if (model.getItem(i).active) {
|
||||
return i
|
||||
if (model.getItem(i).active)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// set the active index
|
||||
function setActiveIndex (index)
|
||||
function setActiveIndex(index)
|
||||
{
|
||||
UM.Controller.setActiveView(index)
|
||||
// the connection to UM.ActiveView will trigger update so there is no reason to call it manually here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue