Merge branch 'master' of github.com:ultimaker/Cura into feature_material_editing

* 'master' of github.com:ultimaker/Cura: (76 commits)
  Added UMO upgrade selection
  Added stubs for UMO upgrade selection
  Machine action labels are now translatable
  Code style CURA-1676
  Using the correct placeholder
  SplashScreen: Using system-default fontfamily
  USBPrinting: Let's "Print via USB"
  BQ Hephestos2 - Preheating temperature fix When starting a print with the "custom" GCode by BQ, the printer resets the nozzle temperature to 210°C when printing via SD card (no matter what you set on Cura) and only preheats the nozzle to 180°C when printing via USB. So currently the printer begins to print via USB at 180°C and reaches the correct temperature eg.g while printing the brim.
  Fix warning about missing color in theme
  Automatically show the Print Monitor when starting a print
  Fix USBPrinterOutputDevice to work with the Print Monitor
  Properly prevent warning when no printer is connected.
  ZOffset decorator is now correctly copied
  Force focus instead of requesting it.
  Fix two "critical errors" on startup
  Minor check machine action GUI improvements
  Prevent warning when no printer is connected.
  Fix empty material/quality profiles when switching variants
  Disable monitor buttons when there is no job running
  Move message stack "above" the viewport overlay
  ...
This commit is contained in:
Arjen Hiemstra 2016-07-04 11:45:59 +02:00
commit 7008e047f6
40 changed files with 1878 additions and 5629 deletions

View file

@ -44,6 +44,7 @@ from . import ZOffsetDecorator
from . import CuraSplashScreen
from . import MachineManagerModel
from . import ContainerSettingsModel
from . import CameraImageProvider
from . import MachineActionManager
from . import ContainerManager
@ -124,7 +125,6 @@ class CuraApplication(QtApplication):
self._platform = None
self._output_devices = {}
self._print_information = None
self._i18n_catalog = None
self._previous_active_tool = None
self._platform_activity = False
self._scene_bounding_box = AxisAlignedBox.Null
@ -135,12 +135,16 @@ class CuraApplication(QtApplication):
self._cura_actions = None
self._started = False
self._i18n_catalog = i18nCatalog("cura")
self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity)
self.getController().toolOperationStopped.connect(self._onToolOperationStopped)
Resources.addType(self.ResourceTypes.QmlFiles, "qml")
Resources.addType(self.ResourceTypes.Firmware, "firmware")
self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Loading machines..."))
## Add the 4 types of profiles to storage.
Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality")
Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants")
@ -229,7 +233,7 @@ class CuraApplication(QtApplication):
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
self.applicationShuttingDown.connect(self.saveSettings)
self.engineCreatedSignal.connect(self._onEngineCreated)
self._recent_files = []
files = Preferences.getInstance().getValue("cura/recent_files").split(";")
for f in files:
@ -238,6 +242,11 @@ class CuraApplication(QtApplication):
self._recent_files.append(QUrl.fromLocalFile(f))
def _onEngineCreated(self):
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
showPrintMonitor = pyqtSignal(bool, arguments = ["show"])
## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently.
#
# Note that the AutoSave plugin also calls this method.
@ -327,13 +336,6 @@ class CuraApplication(QtApplication):
parser.add_argument("--debug", dest="debug-mode", action="store_true", default=False, help="Enable detailed crash reports.")
def run(self):
self._i18n_catalog = i18nCatalog("cura");
i18nCatalog.setTagReplacements({
"filename": "font color=\"black\"",
"message": "font color=UM.Theme.colors.message_text;",
})
self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Setting up scene..."))
controller = self.getController()
@ -554,12 +556,12 @@ class CuraApplication(QtApplication):
for _ in range(count):
if node.getParent() and node.getParent().callDecoration("isGroup"):
new_node = copy.deepcopy(node.getParent()) #Copy the group node.
new_node.callDecoration("setConvexHull",None)
new_node.callDecoration("recomputeConvexHull")
op.addOperation(AddSceneNodeOperation(new_node,node.getParent().getParent()))
else:
new_node = copy.deepcopy(node)
new_node.callDecoration("setConvexHull", None)
new_node.callDecoration("recomputeConvexHull")
op.addOperation(AddSceneNodeOperation(new_node, node.getParent()))
op.push()
@ -817,3 +819,7 @@ class CuraApplication(QtApplication):
def _addProfileWriter(self, profile_writer):
pass
@pyqtSlot("QSize")
def setMinimumWindowSize(self, size):
self.getMainWindow().setMinimumSize(size)