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
path: root/cura
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2017-09-27 14:02:21 +0300
committerJaime van Kessel <nallath@gmail.com>2017-09-27 14:02:21 +0300
commite87f30cf093c41d184c0d771d1aaa556859ce8bb (patch)
treeebe52bb16dc937235d06371a929c1ed95970016e /cura
parenta2e0f4d64fcab35e0eeada795a20b725480013eb (diff)
parent2dee054003cb65ced5e715f9503ea3114969368b (diff)
Merge branch '3.0' of github.com:Ultimaker/Cura
Diffstat (limited to 'cura')
-rw-r--r--cura/CuraSplashScreen.py7
-rwxr-xr-xcura/Settings/ExtruderManager.py5
-rw-r--r--cura/Settings/ProfilesModel.py15
-rw-r--r--cura/Settings/QualityAndUserProfilesModel.py20
-rw-r--r--cura/Settings/UserProfilesModel.py18
5 files changed, 42 insertions, 23 deletions
diff --git a/cura/CuraSplashScreen.py b/cura/CuraSplashScreen.py
index eedf1e3d53..f340c01623 100644
--- a/cura/CuraSplashScreen.py
+++ b/cura/CuraSplashScreen.py
@@ -10,7 +10,6 @@ from PyQt5.QtWidgets import QSplashScreen
from UM.Resources import Resources
from UM.Application import Application
-
class CuraSplashScreen(QSplashScreen):
def __init__(self):
super().__init__()
@@ -61,7 +60,7 @@ class CuraSplashScreen(QSplashScreen):
# draw version text
font = QFont() # Using system-default font here
- font.setPointSize(28)
+ font.setPixelSize(37)
painter.setFont(font)
painter.drawText(220, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0])
if len(version) > 1:
@@ -81,7 +80,7 @@ class CuraSplashScreen(QSplashScreen):
# draw message text
if self._current_message:
font = QFont() # Using system-default font here
- font.setPointSize(10)
+ font.setPixelSize(13)
pen = QPen()
pen.setColor(QColor(255, 255, 255, 255))
painter.setPen(pen)
@@ -107,5 +106,3 @@ class CuraSplashScreen(QSplashScreen):
self._to_stop = True
self._change_timer.stop()
super().close()
-
-
diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py
index 62d16f699a..b16a88f1a9 100755
--- a/cura/Settings/ExtruderManager.py
+++ b/cura/Settings/ExtruderManager.py
@@ -506,7 +506,7 @@ class ExtruderManager(QObject):
result.extend(self.getActiveExtruderStacks())
return result
- ## Returns the list of active extruder stacks.
+ ## Returns the list of active extruder stacks, taking into account the machine extruder count.
#
# \return \type{List[ContainerStack]} a list of
def getActiveExtruderStacks(self) -> List["ExtruderStack"]:
@@ -516,7 +516,8 @@ class ExtruderManager(QObject):
if global_stack and global_stack.getId() in self._extruder_trains:
for extruder in sorted(self._extruder_trains[global_stack.getId()]):
result.append(self._extruder_trains[global_stack.getId()][extruder])
- return result
+
+ return result[:global_stack.getProperty("machine_extruder_count", "value")]
def __globalContainerStackChanged(self) -> None:
global_container_stack = Application.getInstance().getGlobalContainerStack()
diff --git a/cura/Settings/ProfilesModel.py b/cura/Settings/ProfilesModel.py
index c5de9b9136..71426d40f4 100644
--- a/cura/Settings/ProfilesModel.py
+++ b/cura/Settings/ProfilesModel.py
@@ -92,13 +92,22 @@ class ProfilesModel(InstanceContainersModel):
if global_container_stack is None:
return
+ # Detecting if the machine has multiple extrusion
+ multiple_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
# Get the list of extruders and place the selected extruder at the front of the list.
extruder_manager = ExtruderManager.getInstance()
active_extruder = extruder_manager.getActiveExtruderStack()
extruder_stacks = extruder_manager.getActiveExtruderStacks()
- if active_extruder in extruder_stacks:
- extruder_stacks.remove(active_extruder)
- extruder_stacks = [active_extruder] + extruder_stacks
+ if extruder_stacks:
+ if multiple_extrusion:
+ # Place the active extruder at the front of the list.
+ if active_extruder in extruder_stacks:
+ extruder_stacks.remove(active_extruder)
+ extruder_stacks = [active_extruder] + extruder_stacks
+ else:
+ # The active extruder is the first in the list and only the active extruder is use to compute the usable qualities
+ active_extruder = None
+ extruder_stacks = []
# Get a list of usable/available qualities for this machine and material
qualities = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack,
diff --git a/cura/Settings/QualityAndUserProfilesModel.py b/cura/Settings/QualityAndUserProfilesModel.py
index 1fa45a5902..d0d0f2cae2 100644
--- a/cura/Settings/QualityAndUserProfilesModel.py
+++ b/cura/Settings/QualityAndUserProfilesModel.py
@@ -26,15 +26,21 @@ class QualityAndUserProfilesModel(ProfilesModel):
quality_changes_list = quality_manager.findAllQualityChangesForMachine(machine_definition)
# Detecting if the machine has multiple extrusion
- multiple_extrusion = False
- # Get the list of extruders and place the selected extruder at the front of the list.
+ multiple_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
+ # Get the list of extruders
extruder_manager = ExtruderManager.getInstance()
active_extruder = extruder_manager.getActiveExtruderStack()
extruder_stacks = extruder_manager.getActiveExtruderStacks()
- if active_extruder in extruder_stacks:
- multiple_extrusion = True
- extruder_stacks.remove(active_extruder)
- extruder_stacks = [active_extruder] + extruder_stacks
+ if extruder_stacks:
+ if multiple_extrusion:
+ # Place the active extruder at the front of the list.
+ if active_extruder in extruder_stacks:
+ extruder_stacks.remove(active_extruder)
+ extruder_stacks = [active_extruder] + extruder_stacks
+ else:
+ # The active extruder is the first in the list and only the active extruder is use to compute the usable qualities
+ active_extruder = None
+ extruder_stacks = []
# Fetch the list of useable qualities across all extruders.
# The actual list of quality profiles come from the first extruder in the extruder list.
@@ -49,6 +55,6 @@ class QualityAndUserProfilesModel(ProfilesModel):
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") == active_extruder.definition.getId()]
else:
# If not, the quality changes of the global stack are selected
- filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set]
+ filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") is None]
return quality_list + filtered_quality_changes
diff --git a/cura/Settings/UserProfilesModel.py b/cura/Settings/UserProfilesModel.py
index fdb44ce313..b9c9bef89f 100644
--- a/cura/Settings/UserProfilesModel.py
+++ b/cura/Settings/UserProfilesModel.py
@@ -26,15 +26,21 @@ class UserProfilesModel(ProfilesModel):
quality_changes_list = quality_manager.findAllQualityChangesForMachine(machine_definition)
# Detecting if the machine has multiple extrusion
- multiple_extrusion = False
+ multiple_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
# Get the list of extruders and place the selected extruder at the front of the list.
extruder_manager = ExtruderManager.getInstance()
active_extruder = extruder_manager.getActiveExtruderStack()
extruder_stacks = extruder_manager.getActiveExtruderStacks()
- if active_extruder in extruder_stacks:
- multiple_extrusion = True
- extruder_stacks.remove(active_extruder)
- extruder_stacks = [active_extruder] + extruder_stacks
+ if extruder_stacks:
+ if multiple_extrusion:
+ # Place the active extruder at the front of the list.
+ if active_extruder in extruder_stacks:
+ extruder_stacks.remove(active_extruder)
+ extruder_stacks = [active_extruder] + extruder_stacks
+ else:
+ # The active extruder is the first in the list and only the active extruder is use to compute the usable qualities
+ active_extruder = None
+ extruder_stacks = []
# Fetch the list of useable qualities across all extruders.
# The actual list of quality profiles come from the first extruder in the extruder list.
@@ -49,6 +55,6 @@ class UserProfilesModel(ProfilesModel):
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") == active_extruder.definition.getId()]
else:
# If not, the quality changes of the global stack are selected
- filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set]
+ filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") is None]
return filtered_quality_changes