Fix some code style

Contributes to issue CURA-5784.
This commit is contained in:
Ghostkeeper 2018-10-11 13:44:10 +02:00
parent a861b88de1
commit bb75821599
No known key found for this signature in database
GPG Key ID: 5252B696FB5E7C7A
3 changed files with 28 additions and 22 deletions

View File

@ -34,14 +34,18 @@ UM.MainWindow
{ {
// If slidebar is collapsed then it should be invisible // If slidebar is collapsed then it should be invisible
// otherwise after the main_window resize the sidebar will be fully re-drawn // otherwise after the main_window resize the sidebar will be fully re-drawn
if (sidebar.collapsed){ if (sidebar.collapsed)
if (sidebar.visible == true){ {
if (sidebar.visible == true)
{
sidebar.visible = false sidebar.visible = false
sidebar.initialWidth = 0 sidebar.initialWidth = 0
} }
} }
else{ else
if (sidebar.visible == false){ {
if (sidebar.visible == false)
{
sidebar.visible = true sidebar.visible = true
sidebar.initialWidth = UM.Theme.getSize("sidebar").width sidebar.initialWidth = UM.Theme.getSize("sidebar").width
} }

View File

@ -11,9 +11,9 @@ import Cura 1.0 as Cura
import "../components" import "../components"
// This item contains the views selector, a combobox that is dinamically created from // This item contains the views selector, a combobox that is dynamically created from
// the list of available Views (packages that create different visualizactions of the // the list of available Views (packages that create different visualizations of the
// scene. Aside the selector, there is a row of buttons that change the orientation of the view. // scene). Aside from the selector, there is a row of buttons that change the orientation of the view.
Item Item
{ {
id: applicationViewsSelector id: applicationViewsSelector
@ -25,7 +25,8 @@ Item
{ {
id: viewModeButton id: viewModeButton
anchors { anchors
{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width rightMargin: UM.Theme.getSize("default_margin").width
@ -51,8 +52,9 @@ Item
{ {
for (var i = 0; i < model.rowCount(); i++) for (var i = 0; i < model.rowCount(); i++)
{ {
if (model.getItem(i).active) { if (model.getItem(i).active)
return i {
return i;
} }
} }
return 0 return 0