Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2018-06-06 11:59:14 +0300
committerGhostkeeper <rubend@tutanota.com>2018-06-06 11:59:14 +0300
commit4b581d09e769e07f2ec1fb36d62b8a45ceb56ecc (patch)
tree480a2d19064a1a6bcabd07e4f8c06da7648747da
parent753101a9880459829869ed47a35d0f2417908186 (diff)
parentda4932435c138c18feb8c0b0b572b43459654baa (diff)
Merge branch '3.4'
-rwxr-xr-xcura_app.py47
-rw-r--r--resources/qml/WorkspaceSummaryDialog.qml17
-rw-r--r--resources/setting_visibility/basic.cfg1
3 files changed, 46 insertions, 19 deletions
diff --git a/cura_app.py b/cura_app.py
index 1495a9e526..2b823a25c9 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -3,29 +3,42 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
+import argparse
import faulthandler
import os
import sys
from UM.Platform import Platform
-
-# Gets the directory for stdout and stderr
-def get_cura_dir_for_stdoutputs() -> str:
- if Platform.isWindows():
- return os.path.expanduser("~/AppData/Roaming/cura/")
- elif Platform.isLinux():
- return os.path.expanduser("~/.local/share/cura")
- elif Platform.isOSX():
- return os.path.expanduser("~/Library/Logs/cura")
-
-
-# Change stdout and stderr to files if Cura is running as a packaged application.
-if hasattr(sys, "frozen"):
- dir_path = get_cura_dir_for_stdoutputs()
- os.makedirs(dir_path, exist_ok = True)
- sys.stdout = open(os.path.join(dir_path, "stdout.log"), "w", encoding = "utf-8")
- sys.stderr = open(os.path.join(dir_path, "stderr.log"), "w", encoding = "utf-8")
+parser = argparse.ArgumentParser(prog = "cura",
+ add_help = False)
+parser.add_argument('--debug',
+ action='store_true',
+ default = False,
+ help = "Turn on the debug mode by setting this option."
+ )
+parser.add_argument('--trigger-early-crash',
+ dest = 'trigger_early_crash',
+ action = 'store_true',
+ default = False,
+ help = "FOR TESTING ONLY. Trigger an early crash to show the crash dialog."
+ )
+known_args = vars(parser.parse_known_args()[0])
+
+if not known_args["debug"]:
+ def get_cura_dir_path():
+ if Platform.isWindows():
+ return os.path.expanduser("~/AppData/Roaming/cura")
+ elif Platform.isLinux():
+ return os.path.expanduser("~/.local/share/cura")
+ elif Platform.isOSX():
+ return os.path.expanduser("~/Library/Logs/cura")
+
+ if hasattr(sys, "frozen"):
+ dirpath = get_cura_dir_path()
+ os.makedirs(dirpath, exist_ok = True)
+ sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w", encoding = "utf-8")
+ sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w", encoding = "utf-8")
# WORKAROUND: GITHUB-88 GITHUB-385 GITHUB-612
diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml
index 0869d7e698..079d840ae7 100644
--- a/resources/qml/WorkspaceSummaryDialog.qml
+++ b/resources/qml/WorkspaceSummaryDialog.qml
@@ -148,9 +148,22 @@ UM.Dialog
{
height: childrenRect.height
width: parent.width
- Label
+ Label
{
- text: catalog.i18nc("@action:label", "Extruder %1").arg(modelData)
+ text: {
+ var extruder = Number(modelData)
+ var extruder_id = ""
+ if(!isNaN(extruder))
+ {
+ extruder_id = extruder + 1 // The extruder counter start from One and not Zero
+ }
+ else
+ {
+ extruder_id = modelData
+ }
+
+ return catalog.i18nc("@action:label", "Extruder %1").arg(extruder_id)
+ }
font.bold: true
}
Row
diff --git a/resources/setting_visibility/basic.cfg b/resources/setting_visibility/basic.cfg
index 4196a3a9e7..82045db93b 100644
--- a/resources/setting_visibility/basic.cfg
+++ b/resources/setting_visibility/basic.cfg
@@ -34,6 +34,7 @@ retraction_hop_enabled
[cooling]
cool_fan_enabled
+cool_fan_speed
[support]
support_enable