436 Commits

Author SHA1 Message Date
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Ghostkeeper
261089eed3
Fix type hinting imports
Because circular imports. I hate our current import technique...

Contributes to issue CURA-4357.
2017-09-22 11:53:10 +02:00
Ghostkeeper
3d921c1b4e
Add type hinting of return values
I thought this might help find some bugs there.

Contributes to issue CURA-4357.
2017-09-22 11:30:35 +02:00
Ghostkeeper
1596437bbd
getActiveGlobalAndContainerStacks may return None
Change the code to reflect on this. Mostly this is to fix up the type warnings, because we were already checking for there being no global container stack but that was not thread-safe.

Contributes to issue CURA-4357.
2017-09-22 11:17:42 +02:00
Ghostkeeper
88155d35e8
Correct signature of activeMachine
Because there isn't always a global container stack.

Contributes to issue CURA-4357.
2017-09-22 11:11:34 +02:00
Diego Prado Gesto
4d99fb067f After disconnect a signal, now is reconnected the correct one - CURA-4327 2017-09-20 17:19:44 +02:00
alekseisasin
204019702d Added Title for messages
CURA-4203
2017-09-13 13:58:08 +02:00
Lipu Fei
3fbdb27e8e Merge branch 'master' into feature_dark_colours_icons
CURA-4148

Resolve merge conflicts.
2017-08-28 11:13:38 +02:00
Ghostkeeper
585c04dfaa
Also show warning icon when the set-up on other extruders is unsupported
So I added a function that checks the support on all extruders and the global stack.

Contributes to issue CURA-4148.
2017-08-25 14:27:45 +02:00
alekseisasin
9363f93467 Merge pull request #2224 from fieldOfView/fix_multiextruder_menus
Fix multiextruder menus
2017-08-23 09:08:48 +02:00
Ghostkeeper
b9cdeb68d6
Don't crash when there is no global quality container
We fill the stack with an empty container rather than with None in that case.

Contributes to issue CURA-3301.
2017-08-08 14:40:02 +02:00
Ghostkeeper
fe406f530c
Never fill None for quality changes profile
We want it to be the empty profile instead. This gets passed on all the way to _replaceQualityOrQualityChangesInStack where the metadata is requested.

Contributes to issue CURA-3301.
2017-08-08 13:51:40 +02:00
fieldOfView
975e7f04b4 Remove unused incorrect code
The property is called activeMaterialIds, but it returns the stack ids. The code is superceeded by allActiveMaterialIds.
2017-08-08 11:27:45 +02:00
Jaime van Kessel
e636dbdd10 Merge pull request #2107 from fieldOfView/feature_pyserial_usb_detection
Use pyserial to list serial ports
2017-07-27 09:31:35 +02:00
Lipu Fei
9c1d23fe5b Make sure MachineManager initializes after ContainerRegistry does
CURA-4084

When MachineManager gets created, it will find and set the current
active machine. This requires the ContainerRegistry to be initialized
first.
2017-07-26 14:09:18 +02:00
Lipu Fei
93731b8d1f Trigger auto-slice based on stackValidation instead of stack/setting changes
CURA-4084

Stack error checks are scheduled with a delay, and when a container is
changed (e.g. Quality), the auto-slice may get triggered before the
error check is done. Because the error check result is cached, the
auto-slicing will use the previous result instead of new. So, the
auto-slicing should be triggered when a stack validation is finished
instead of when a stack/setting gets changed.
2017-07-26 14:09:18 +02:00
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