This commit is contained in:
Diego Prado Gesto 2018-02-16 09:15:12 +01:00
commit 125fd1a1e2
3 changed files with 10 additions and 5 deletions

View File

@ -13,9 +13,8 @@ import ssl
import urllib.request import urllib.request
import urllib.error import urllib.error
import shutil import shutil
import sys
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QFile
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit, QGroupBox, QCheckBox, QPushButton from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit, QGroupBox, QCheckBox, QPushButton
from UM.Application import Application from UM.Application import Application
@ -23,6 +22,7 @@ from UM.Logger import Logger
from UM.View.GL.OpenGL import OpenGL from UM.View.GL.OpenGL import OpenGL
from UM.i18n import i18nCatalog from UM.i18n import i18nCatalog
from UM.Platform import Platform from UM.Platform import Platform
from UM.Resources import Resources
catalog = i18nCatalog("cura") catalog = i18nCatalog("cura")
@ -91,6 +91,7 @@ class CrashHandler:
label = QLabel() label = QLabel()
label.setText(catalog.i18nc("@label crash message", """<p><b>A fatal error has occurred.</p></b> label.setText(catalog.i18nc("@label crash message", """<p><b>A fatal error has occurred.</p></b>
<p>Unfortunately, Cura encountered an unrecoverable error during start up. It was possibly caused by some incorrect configuration files. We suggest to backup and reset your configuration.</p> <p>Unfortunately, Cura encountered an unrecoverable error during start up. It was possibly caused by some incorrect configuration files. We suggest to backup and reset your configuration.</p>
<p>Your backup can be found in your Configuration folder.</p>
<p>Please send us this Crash Report to fix the problem.</p> <p>Please send us this Crash Report to fix the problem.</p>
""")) """))
label.setWordWrap(True) label.setWordWrap(True)

View File

@ -19,13 +19,14 @@ if MYPY:
# Make color brighter by normalizing it (maximum factor 2.5 brighter) # Make color brighter by normalizing it (maximum factor 2.5 brighter)
def prettier_color(l): # color_list is a list of 4 elements: [r, g, b, a], each element is a float 0..1
maximum = max(l[:3]) def prettier_color(color_list):
maximum = max(color_list[:3])
if maximum > 0: if maximum > 0:
factor = min(1 / maximum, 2.5) factor = min(1 / maximum, 2.5)
else: else:
factor = 1.0 factor = 1.0
return [min(i * factor, 1.0) for i in l] return [min(i * factor, 1.0) for i in color_list]
## A render pass subclass that renders slicable objects with default parameters. ## A render pass subclass that renders slicable objects with default parameters.

View File

@ -775,6 +775,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
# Ensure a unique ID and name # Ensure a unique ID and name
stack.setMetaDataEntry("id", new_id) stack.setMetaDataEntry("id", new_id)
# Keep same quality between extruders and global stack
stack.quality = global_stack.quality
self._container_registry.addContainer(stack) self._container_registry.addContainer(stack)
extruder_stacks_added.append(stack) extruder_stacks_added.append(stack)
containers_added.append(stack) containers_added.append(stack)