Commit graph

21759 commits

Author SHA1 Message Date
Remco Burema
745390e51f Fix typing.
part CURA-6600
2019-08-27 17:57:11 +02:00
Ghostkeeper
9297890d78
Fix typing of approximate diameter and add typing to function for it
Seems I forgot to add typing and that's biting my bum right now.

Contributes to issue CURA-6600.
2019-08-27 17:21:22 +02:00
Ghostkeeper
3952366798
Move createMaterial to MaterialManagementModel and simplify it a bit
We can reuse our duplicateMaterial function again but in a simpler way. Also finding the preferred material is simpler with our container tree.
However there seems to be a problem with finding the preferred material; it's not finding generic_pla for UM3 and AA0.4 anyway, and then falls back on a random material. This needs to be fixed in the variant node class.

Contributes to issue CURA-6600.
2019-08-27 17:21:22 +02:00
Ghostkeeper
cb344f9dec
Fix serialising materials without nozzle profile again
Oops. This is simpler anyway.

Contributes to issue CURA-6600.
2019-08-27 17:21:21 +02:00
Ghostkeeper
957894b614
Fix duplicating a favourite material
The duplicate must also be favourite.

Contributes to issue CURA-6600.
2019-08-27 17:21:21 +02:00
Ghostkeeper
1874a6453d
Move duplicateMaterial into MaterialManagementModel
To move away from the deprecated MaterialManager class.

Contributes to issue CURA-6600.
2019-08-27 17:21:21 +02:00
Ghostkeeper
924d4cc13b
Remove unused container_tree variable
Contributes to issue CURA-6600.
2019-08-27 17:21:20 +02:00
Remco Burema
83146a71a9 Merge branch 'feature_intent_container_tree' of https://github.com/Ultimaker/Cura into feature_intent_container_tree 2019-08-27 16:21:36 +02:00
Remco Burema
c71660cc11 Fix occasional crash when entering profiles section.
Make QualityManagementModel into a singleton.
part of CURA-6600
2019-08-27 16:21:30 +02:00
Ghostkeeper
20be7fd8a1
Don't add to variant-specific mapping if it's not variant-specific
Otherwise we'll encounter that the variant name is None when serialising that subprofile.

Contributes to issue CURA-6600.
2019-08-27 16:06:09 +02:00
Remco Burema
c333e980dc Merge branch 'feature_intent_container_tree' of https://github.com/Ultimaker/Cura into feature_intent_container_tree 2019-08-27 15:50:21 +02:00
Ghostkeeper
dabd905853
Fix serialising materials with submaterials in not loaded container trees
Material profiles need to serialise subprofiles that belong to different printers as well. Some of these materials may not be loaded in the ContainerTree structure. To prevent having to load that as well, we're just not going to use the container tree any more. It turns out that the only reason it was using the container tree was to get the hardware_type metadata from the node in the tree. So just get that from the container itself and we're fine.

Contributes to issue CURA-6600.
2019-08-27 15:47:42 +02:00
Ghostkeeper
63ae6ee9ec
Fix updating materials models when materials change before first printer switch
Otherwise the _extruder_stack field would not yet be set.

Contributes to issue CURA-6600.
2019-08-27 15:47:41 +02:00
Ghostkeeper
8346e465f6
Turn MaterialManagementModel into a singleton
Just like MaterialManager used to be. There can be only one instance of the page then.
This prevents a crash when Qt deletes the QObject because it's no longer used in the page when you close the preferences screen. But when you open it again it doesn't construct a new one. Now there is always one instance so that's not a problem any more. Also it allows other pages to access this item.

Contributes to issue CURA-6600.
2019-08-27 15:47:41 +02:00
Ghostkeeper
b60b13e5bf
Use container tree to check for variants when serialising
Not the variant manager, because it's deprecated.

Contributes to issue CURA-6600.
2019-08-27 15:47:41 +02:00
Ghostkeeper
3dc7c7b61c
Move removeMaterial to MaterialManagementModel
Moving away from the MaterialManager.

Contributes to issue CURA-6600.
2019-08-27 15:47:40 +02:00
Ghostkeeper
99ccddefa4
Move setMaterialName to MaterialManagementModel
No longer use the material manager which is deprecated.

Contributes to issue CURA-6600.
2019-08-27 15:47:40 +02:00
Ghostkeeper
5b8ed91b04
Create new MaterialManagementModel and move canMaterialBeRemoved
Just like the QualityManagementModel, this class is intended to be used as proxy for the material management page in the preferences. I'm intending to move all relevant pyqtSlots from the material manager into this one. The advantage of this switch is that the material manager had no well-bounded scope and so tended to become a big mess of all sorts of functions. This one has a clear scope: serve as a proxy for the buttons you can press in the preferences screen for materials.

Contributes to issue CURA-6600.
2019-08-27 15:47:40 +02:00
Remco Burema
f7a15ca507 Merge branch 'feature_intent_container_tree' of https://github.com/Ultimaker/Cura into feature_intent_container_tree 2019-08-27 15:46:59 +02:00
Remco Burema
d5a8b2640f Fix 'getQualityChangesGroups' now gives a list issues.
part of CURA-6600
2019-08-27 15:46:47 +02:00
Remco Burema
fbf4d42f06 Active quality group can be None.
part of CURA-6600
2019-08-27 15:22:26 +02:00
Jaime van Kessel
36dfd23e3f Remove old buildplate function
CURA-6600
2019-08-27 15:06:27 +02:00
Jaime van Kessel
d479e5ec58 Removed no longer used initialize function
CURA-6600
2019-08-27 15:05:39 +02:00
Lipu Fei
9f110368de Add do_HEAD() for auth req handler
CURA-6609
2019-08-27 14:48:02 +02:00
Jaime van Kessel
8f75a12d27 Fix network config syncing 2019-08-27 14:46:33 +02:00
Lipu Fei
79f11286a6 Fix typing
CURA-6643
2019-08-27 14:42:31 +02:00
Lipu Fei
946b2b943e F5 reloads gcode file
CURA-6643
2019-08-27 14:42:31 +02:00
Jaime van Kessel
d1a8ce54a1 Merge branch 'feature_intent' of github.com:Ultimaker/Cura into feature_intent_container_tree 2019-08-27 14:18:41 +02:00
Jaime van Kessel
8c98773f55 Fix issues with sorting if no printer type is set 2019-08-27 14:18:07 +02:00
Jaime van Kessel
1d9d411732 Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent 2019-08-27 14:17:57 +02:00
Jaime van Kessel
72ea1257d7 Prevent crash when machine isn't configured correctly yet
CURA-6600
2019-08-27 13:50:12 +02:00
Jaime van Kessel
867a881de9 Ensure bool and enum settings get control highlighted on hover 2019-08-27 13:38:55 +02:00
Jaime van Kessel
e8cd5723c9 Speedup the layerview
We were doing a lot of re-calculations that served no purpose (and
even slowed down the rest of the application)
2019-08-27 13:26:55 +02:00
Jaime van Kessel
ea11187eaf Don't reset the data when the root updates
Resolves #6258
2019-08-27 13:18:11 +02:00
Jaime van Kessel
511eba28b6 Ensure that min/max feedrate & thickness gets defined in init 2019-08-27 13:06:33 +02:00
Ghostkeeper
3f5563514c
Remove _current_quality_changes_group shadow administration
Get the quality changes group back from whichever one is actually active on the stack. This prevents the two from getting out of sync, which makes the code easier to maintain.

Contributes to issue CURA-6600.
2019-08-27 13:03:29 +02:00
Jaime van Kessel
9c2f8a94d5 Greatly simplify the SimulationViewProxy 2019-08-27 13:03:23 +02:00
Ghostkeeper
62395d5503
Remove _current_quality_group shadow administration
This was causing asynchronicities.

Contributes to issue CURA-6600.
2019-08-27 12:39:19 +02:00
Jaime van Kessel
ced14c7daf Merge branch 'CURA-6388_restore_missing_metadata' of github.com:Ultimaker/Cura 2019-08-27 11:43:27 +02:00
Jaime van Kessel
bf66388939 Make functions that should have been static, static. 2019-08-27 11:41:21 +02:00
Jaime van Kessel
43d1157aa1 Fix typing error
CURA-6388
2019-08-27 11:38:25 +02:00
Ghostkeeper
89a5fe41fe
Fix getting empty quality containers
Contributes to issue CURA-6600.
2019-08-27 11:19:02 +02:00
Ghostkeeper
6f67e6b55f
Simplify activeQualityType() and remove dependency on _current_quality_group
The shadow administration is annoying so I'm removing it.

Contributes to issue CURA-6600.
2019-08-27 11:16:00 +02:00
Ghostkeeper
84c6ec36dc
Catch case where there is no global stack
Contributes to issue CURA-6600.
2019-08-27 11:14:07 +02:00
Ghostkeeper
78db68369e
Simplify activeQualityOrQualityChangesName
Removed duplicate fallback mechanism if quality is empty. And removed dependency on shadow administration in _current_quality_group.

Contributes to issue CURA-6600.
2019-08-27 11:11:17 +02:00
Ghostkeeper
01796b99cd
Simplify getting layer height
The stack already makes it fall through properly, so there's no need to implement the fallback again here.

The only change is that it now displays 0.1mm as default layer height if there is no quality profile active. I don't think this makes a difference since we don't show the layer height then anyway. And technically it would be more correct too.

Contributes to issue CURA-6600.
2019-08-27 11:06:35 +02:00
Ghostkeeper
0db99e8f21
Get quality groups from container tree
Rather than from the quality manager.

Contributes to issue CURA-6600.
2019-08-27 11:03:46 +02:00
Lipu Fei
69e9dc1313 Allow importing "not supported" profiles
CURA-6542
2019-08-27 09:08:19 +02:00
Ghostkeeper
8f34b3dd73
Set quality profiles to preferred quality upon stack creation
A good default.
Possible bug: If there are multiple matching quality profiles but the preferred quality profiles matches none or multiple of them, a random one is chosen. The random profile for the global stack may not match the random one for the extruder?

Contributes to issue CURA-6600.
2019-08-27 09:07:23 +02:00
Lipu Fei
3853fb6d19 Add UI feedback on invalid firmware update
CURA-6537
2019-08-27 08:52:13 +02:00