Youness Alaoui
7e7e15a12b
Fix MachineManager connection to OutputDeviceManager signals late.
...
If a PrinterOutputDevice is able to connect quickly to a machine, then
by the time the MachineManager is created and connects to the signal,
it will be too late, and it might miss that there is already connected
devices.
# Conflicts:
# plugins/USBPrinting/USBPrinterOutputDeviceManager.py
2017-07-12 14:06:08 +02:00
Ghostkeeper
81e07b1530
Use stack properties instead of .findContainer(type = ...)
...
Recently we changed the empty containers such that there is only one empty container instance and it doesn't have the proper type any more. Instead we have properties on the stack that allows us to find the container with the proper type. It's faster and easier to use.
We've had a few bugs about this so I decided to update all of them to remove those for the future, except the ones in plugins/MachineSettingsAction/MachineSettingsAction.py because we have a pending pull request that fixes those. Fixing them would give merge conflicts for fieldOfView.
It doesn't really belong to CURA-4024 but I'm sticking it under that nomer anyway to get it reviewed.
2017-07-10 10:35:03 +02:00
Ghostkeeper
21624d7761
Merge branch '2.6'
2017-06-27 16:25:55 +02:00
Ghostkeeper
b2b9b1bede
Fix checking if container stack exists
...
It was checking a container stack ID against the definition containers, which doesn't match.
Contributes to issue CURA-3973.
2017-06-27 15:14:26 +02:00
Ghostkeeper
df2ec7bd73
Don't try to activate a machine that we don't have a definition for
...
Contributes to issue CURA-3973.
2017-06-27 14:02:35 +02:00
Ghostkeeper
13c9519a7c
Fix deprecated decorator
...
Contributes to issue CURA-2822.
2017-06-23 09:42:08 +02:00
Ghostkeeper
121bf5897d
Deprecate _updateMaterialContainer
...
There are better alternatives nowadays.
Discovered during CURA-2822.
2017-06-22 18:17:15 +02:00
fieldOfView
49f2fb2cea
Fix filtering maerials after editing materials
...
NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string.
2017-06-14 10:42:04 +02:00
Jaime van Kessel
9a54ff426b
FindAllQualitiesForMachineMaterial only looks with basic materials if it found them
...
CURA-3911
2017-06-12 15:14:25 +02:00
Jaime van Kessel
a306b4dada
We now properly fall back if no basic material is found
...
CURA-3911
2017-06-12 13:53:35 +02:00
Lipu Fei
8af1cc886f
Use .definition to access DefinitionContainer in qml
...
CURA-3810
2017-05-30 12:49:12 +02:00
Lipu Fei
85e875257b
Use "/<version>/<machineName>" as the material info URL suffix
...
CURA-3810
2017-05-29 15:23:52 +02:00
Ghostkeeper
1f33a0d4cd
Use per-parameter-value compression for signals
...
This will only emit one signal for each unique combination of parameters.
Contributes to issue CURA-3803.
2017-05-22 15:36:46 +02:00
Ghostkeeper
bec43d5b9a
Make sure that the preferred material name variable exists
...
Another small bug I found when looking through this MachineManager code. My IDE was complaining that the preferred_material_name was not always initialised and that preferred_material was an unused variable.
Doesn't contribute to issue CURA-3803.
2017-05-22 15:36:46 +02:00
Ghostkeeper
5f0fb3f9bd
Don't squash signals updating materials and variants
...
These may have different parameters, such as which machine and extruder they are updating the material and variant of. If we only pass the last signal on, then we're missing the update of other extruders.
Contributes to issue CURA-3803.
2017-05-22 14:01:58 +02:00
Ghostkeeper
76a9a9a9ab
Erase changed hotends/materials after applying changes
...
Otherwise we may only change one of the extruders next time, and it'll still have the other change in this dictionary from the previous time we are syncing from the printer.
Contributes to issue CURA-3788.
2017-05-19 14:39:22 +02:00
Lipu Fei
b027437ef3
Activate a new machine (if any) before removing a machine
...
CURA-3756
2017-05-17 15:57:12 +02:00
Jaime van Kessel
ba4d62e8ca
Added missing typehinting
2017-05-12 16:45:58 +02:00
Jaime van Kessel
bfc65cb4a9
Added typing to active stack
2017-05-12 16:40:02 +02:00
Jaime van Kessel
7ee5a66c64
CuraContainerStack now overrides getBottom, so it always returns a definition
2017-05-12 16:32:00 +02:00
Jaime van Kessel
77204fc4b0
Type hinting & unused code removal
2017-05-12 16:27:37 +02:00
Jaime van Kessel
2b64e92a99
Removed unused imports
2017-05-12 16:13:09 +02:00
Jaime van Kessel
ef2aa3b2b2
Empty InstanceContainers are now correctly handled by setActiveMaterial again
...
CURA-3789
2017-05-12 13:59:31 +02:00
Jaime van Kessel
27d6bebf32
Adding a new printer now activates it again
...
CURA-3783
2017-05-10 16:12:01 +02:00
Jaime van Kessel
bfb76540d0
InstanceContainerchanged is now also on a timer.
...
This greatly reduces the signal storm resulting from changing quality / material in multi extrusion machines.
CURA-3780
2017-05-10 13:22:34 +02:00
Jaime van Kessel
e313794b12
Fixed posponing of certain events
...
CURA-3780
2017-05-10 13:16:49 +02:00
Jaime van Kessel
2375c832be
Revert "ReplaceQuality changes only emits signals if there was a change"
...
This reverts commit 9a387f9ee2beb705afe959df92d405fc81720ccf.
2017-05-10 11:50:17 +02:00
Jaime van Kessel
42fc703516
Added a few profiling decorators to expensive methods
2017-05-10 10:45:07 +02:00
Jaime van Kessel
9a387f9ee2
ReplaceQuality changes only emits signals if there was a change
...
CURA-3780
2017-05-10 10:33:40 +02:00
Jaime van Kessel
19bc6bb710
All error checks now use the timer instead of re-checking multiple times.
...
This significantly speeds up all setting / container changes for multi extrusion machines
CURA-3780
2017-05-09 14:38:57 +02:00
Jaime van Kessel
6493bcd5b5
Merge branch 'master' of github.com:Ultimaker/Cura
2017-05-09 14:02:09 +02:00
Jaime van Kessel
40c9e45532
Send specific signals for container changes if we know the type
...
CURA-3780
2017-05-09 14:01:37 +02:00
Lipu Fei
5706a540d9
Only set global stack in addMachine() if there was none
2017-05-09 13:57:02 +02:00
Jaime van Kessel
bd25448021
Changes to make um2 upgrade work with new stack changes
...
CURA-3742
2017-05-08 15:03:39 +02:00
fieldOfView
98b127851b
Fix setting number of extruders when hasVariants is set
2017-05-08 12:54:12 +02:00
Ghostkeeper
ea9e0e2e9c
Replace material without needing to find its index
...
We have an easy setter for this.
Contributes to issue CURA-3497.
2017-05-03 17:09:33 +02:00
Ghostkeeper
c42d092b0f
Merge branch 'master' into cura_containerstack
2017-05-03 15:21:01 +02:00
Ghostkeeper
86f1a0559f
Add documentation and further specify except around disconnecting signals
...
Catch just a TypeError instead of all exceptions. Added documentation to say why we catch a TypeError there. Also splitted up the try-except block for the 3 disconnects, just so that if the first fails we still try to disconnect from the other two.
Contributes to issue CURA-3497.
2017-05-03 14:56:52 +02:00
Jaime van Kessel
9a46a24b19
Profile menu now correctly marks active qualties as checked
...
CURA-3497
2017-05-03 13:13:09 +02:00
Jaime van Kessel
d83b4daf78
Switching from quality_changes to quality profile is now possible again
...
CURA-3497
2017-05-03 11:23:59 +02:00
Jaime van Kessel
c8f823154c
Instead of searching for a container with type, we now use the newly introduced properties
...
CURA-3497
2017-05-03 11:10:39 +02:00
Jaime van Kessel
f062322ebf
Switching from dual extrusion to single extrusion machine is now possible again
...
CURA-3497
2017-05-03 10:59:07 +02:00
Jaime van Kessel
ab6240bd31
Replace quality(changes) in machine manager now uses new API as well
...
CURA-3497
2017-05-03 10:38:31 +02:00
Jaime van Kessel
a028297cb2
Machine manager now uses the new specific setters to switch instanceContainers
...
CURA-3497
2017-05-03 10:15:18 +02:00
Jaime van Kessel
d7004d3547
Merge branch 'master' of github.com:Ultimaker/Cura into cura_containerstack
2017-05-02 11:42:16 +02:00
Jack Ha
ed23e6f5b2
Removed more commented out code. CURA-3497
2017-04-25 08:56:28 +02:00
fieldOfView
2ca24ba7e6
Restore both material and variant to match 1st extruder when switching to single extrusion
2017-04-22 11:20:55 +02:00
Arjen Hiemstra
af3f340fc2
Handle the fact that findContainers might end up returning None
...
Since we now do not necessarily have a container with the specified
type.
2017-04-18 17:37:05 +02:00
Jaime van Kessel
53ecaba7f2
Added more typing.
...
These typing hints should have prevented the previous issue from happening
2017-04-14 14:21:36 +02:00
Jaime van Kessel
09d624dcfe
Fixed accidental switch of function properties
2017-04-14 14:15:43 +02:00