Fix merge conflicts

This commit is contained in:
Lipu Fei 2019-03-26 16:33:13 +01:00
commit 56a3b2dfa7
3 changed files with 8 additions and 7 deletions

View File

@ -24,6 +24,7 @@ from UM.PluginError import PluginNotFoundError
from UM.Resources import Resources from UM.Resources import Resources
from UM.Preferences import Preferences from UM.Preferences import Preferences
from UM.Qt.QtApplication import QtApplication # The class we're inheriting from. from UM.Qt.QtApplication import QtApplication # The class we're inheriting from.
import UM.Util
from UM.View.SelectionPass import SelectionPass # For typing. from UM.View.SelectionPass import SelectionPass # For typing.
from UM.Math.AxisAlignedBox import AxisAlignedBox from UM.Math.AxisAlignedBox import AxisAlignedBox
@ -552,11 +553,11 @@ class CuraApplication(QtApplication):
@pyqtProperty(bool) @pyqtProperty(bool)
def needToShowUserAgreement(self) -> bool: def needToShowUserAgreement(self) -> bool:
return not self.getPreferences().getValue("general/accepted_user_agreement") return not UM.Util.parseBool(self.getPreferences().getValue("general/accepted_user_agreement"))
@pyqtSlot(bool) @pyqtSlot(bool)
def setNeedToShowUserAgreement(self, set_value = True) -> None: def setNeedToShowUserAgreement(self, set_value: bool = True) -> None:
self.getPreferences().setValue("general/accepted_user_agreement", not set_value) self.getPreferences().setValue("general/accepted_user_agreement", str(not set_value))
@pyqtSlot(str, str) @pyqtSlot(str, str)
def writeToLog(self, severity: str, message: str) -> None: def writeToLog(self, severity: str, message: str) -> None:

View File

@ -74,13 +74,13 @@ UM.MainWindow
Cura.Actions.parent = backgroundItem Cura.Actions.parent = backgroundItem
CuraApplication.purgeWindows() CuraApplication.purgeWindows()
if (CuraApplication.needToShowUserAgreement) if (CuraApplication.needToShowUserAgreement || Cura.MachineManager.activeMachine == null)
{ {
welcomeDialog.show() welcomeDialog.visible = true
} }
else else
{ {
welcomeDialog.close() welcomeDialog.visible = false
} }
// TODO: While the new onboarding process contains the user-agreement, // TODO: While the new onboarding process contains the user-agreement,
// it should probably not entirely rely on 'needToShowUserAgreement' for show/hide. // it should probably not entirely rely on 'needToShowUserAgreement' for show/hide.

View File

@ -200,7 +200,7 @@ Item
onClicked: onClicked:
{ {
// open the troubleshooting URL with web browser // open the troubleshooting URL with web browser
var url = "https://ultimaker.com/incoming-links/cura/material-compatibilty" // TODO const url = "https://ultimaker.com/en/resources/39129-network-troubleshooting-cura"
Qt.openUrlExternally(url) Qt.openUrlExternally(url)
} }
onEntered: onEntered: