Merge branch '3.1'

This commit is contained in:
ChrisTerBeke 2017-11-28 15:45:57 +01:00
commit 263230f9d2
2 changed files with 15 additions and 3 deletions

View File

@ -154,6 +154,7 @@ class SimulationView(View):
def _onSceneChanged(self, node): def _onSceneChanged(self, node):
self.setActivity(False) self.setActivity(False)
self.calculateMaxLayers() self.calculateMaxLayers()
self.calculateMaxPathsOnLayer(self._current_layer_num)
def isBusy(self): def isBusy(self):
return self._busy return self._busy

View File

@ -303,7 +303,7 @@ Item
// only change if an active machine is set and the slider is visible at all. // only change if an active machine is set and the slider is visible at all.
if (Cura.MachineManager.activeMachine != null && visible) { if (Cura.MachineManager.activeMachine != null && visible) {
// prevent updating during view initializing. Trigger only if the value changed by user // prevent updating during view initializing. Trigger only if the value changed by user
if (qualitySlider.value != qualityModel.qualitySliderActiveIndex) { if (qualitySlider.value != qualityModel.qualitySliderActiveIndex && qualityModel.qualitySliderActiveIndex != -1) {
// start updating with short delay // start updating with short delay
qualitySliderChangeTimer.start() qualitySliderChangeTimer.start()
} }
@ -368,7 +368,7 @@ Item
{ {
id: customisedSettings id: customisedSettings
visible: Cura.SimpleModeSettingsManager.isProfileCustomized visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated
height: speedSlider.height * 0.8 height: speedSlider.height * 0.8
width: speedSlider.height * 0.8 width: speedSlider.height * 0.8
@ -380,9 +380,20 @@ Item
iconSource: UM.Theme.getIcon("reset"); iconSource: UM.Theme.getIcon("reset");
onClicked: onClicked:
{
// if the current profile is user-created, switch to a built-in quality
if (Cura.SimpleModeSettingsManager.isProfileUserCreated)
{
if (Cura.ProfilesModel.rowCount() > 0)
{
Cura.MachineManager.setActiveQuality(Cura.ProfilesModel.getItem(0).id)
}
}
if (Cura.SimpleModeSettingsManager.isProfileCustomized)
{ {
discardOrKeepProfileChangesDialog.show() discardOrKeepProfileChangesDialog.show()
} }
}
onEntered: onEntered:
{ {
var content = catalog.i18nc("@tooltip","You have modified some profile settings. If you want to change these go to custom mode.") var content = catalog.i18nc("@tooltip","You have modified some profile settings. If you want to change these go to custom mode.")