Merge branch 'WIP_onboarding' of github.com:Ultimaker/Cura into WIP_onboarding

This commit is contained in:
Jaime van Kessel 2019-04-03 17:04:16 +02:00
commit cf68fb9cae
4 changed files with 10 additions and 3 deletions

View File

@ -95,6 +95,7 @@ class FirstStartMachineActionsModel(ListModel):
"content": item.displayItem, "content": item.displayItem,
"action": item, "action": item,
}) })
item.reset()
self.setItems(item_list) self.setItems(item_list)
self.reset() self.reset()

View File

@ -84,7 +84,7 @@ UM.MainWindow
Cura.Actions.parent = backgroundItem Cura.Actions.parent = backgroundItem
CuraApplication.purgeWindows() CuraApplication.purgeWindows()
if (CuraApplication.needToShowUserAgreement || Cura.MachineManager.activeMachine == null) if (CuraApplication.needToShowUserAgreement)
{ {
welcomeDialog.visible = true welcomeDialog.visible = true
} }
@ -851,6 +851,10 @@ UM.MainWindow
{ {
base.visible = true; base.visible = true;
} }
if(!CuraApplication.needToShowUserAgreement && Cura.MachineManager.activeMachine == null)
{
addMachineDialog.open();
}
} }
} }

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2019 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
@ -38,7 +38,8 @@ UM.Dialog
onVisibilityChanged: onVisibilityChanged:
{ {
// Reset selection and machine name // Reset selection and machine name
if (visible) { if (visible)
{
activeCategory = preferredCategory; activeCategory = preferredCategory;
machineList.currentIndex = 0; machineList.currentIndex = 0;
machineName.text = getMachineName(); machineName.text = getMachineName();

View File

@ -147,6 +147,7 @@ ScrollView
} }
text: name text: name
visible: base.currentSection == section visible: base.currentSection == section
onClicked: ListView.view.currentIndex = index
} }
} }
} }