62 Commits

Author SHA1 Message Date
Ghostkeeper
d810c7ddbb
Properly reload extruders at the start
The extruder manager was too late to catch the initial global stack switch and machine switch. Now it just always reloads the extruders at the beginning.

Contributes to issues CURA-1278 and CURA-351.
2016-06-05 16:17:55 +02:00
Arjen Hiemstra
186eca160b Fix containersChanged signal handlers
Fixes CURA-1642
2016-06-02 16:25:13 +02:00
Ghostkeeper
8a8de95969
Add iteration over extruder manager
This iteration iterates over the extruders.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
8369316236
Use modern import method
This is more robust to cyclic dependencies, and also the intended way of importing these classes in Python in general.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
8a8b0016ba
Add signal for when extruder list changes
The ExtrudersModel will need to listen to this.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
06f7f90bb0
Make ExtruderManager into a singleton
This way we don't need to load it in CuraApplication but we can just load it whenever it is first needed. ExtruderManager should be robust against initialising it at any point in Cura's runtime.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
1f9805a73c
Remove unused imports
These are unused because the code was moved to Extruder.py

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
73f12ffd99
Incorporate switching of global extruder stack
When the global extruder stack switches, we need to re-connect the reloading of extruders to the new containersChanged signal of the new global container stack. This now also bootstraps the listening for the first time, when the global container stack changes from None to the first stack.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 11:17:52 +02:00
Ghostkeeper
d1566ef637
Also reload extruders at init
Not a reload really, just a load.

Contributes to issues CURA-1278 and CURA-351.
2016-06-01 14:55:15 +02:00
Ghostkeeper
60a71fcc33
Only list extruders in extruder manager
Let the extruders themselves take care of which profiles are attached to each.

Contributes to issues CURA-1278 and CURA-351.
2016-06-01 14:54:30 +02:00
Ghostkeeper
377fed206c
Remove extruder creation logic from manager
This logic is now in cura/Extruder.py.

Contributes to issues CURA-1278 and CURA-351.
2016-06-01 13:52:57 +02:00
Ghostkeeper
a08e71774d
Make ExtruderManagerModel no longer a PyQt model
It is still a model according to the MVC paradigm but not according to Qt. To be consistent with the rest, don't call it a model any more.

Contributes to issues CURA-1278 and CURA-351.
2016-06-01 12:03:01 +02:00