36 Commits

Author SHA1 Message Date
Ghostkeeper
31106d13d0
Reduce nesting complexity with some pre-checks
There were two pre-checks here, where the main body of the function was indented two deep. Instead, just early-out if the checks fail. This is easier to read and understand.

Found during investigation of CURA-8128.
2021-06-16 12:58:09 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
a4fe3d7685 Convert doxygen to rst for POS, MonitorStage, PostProcessing 2020-05-08 16:28:07 +02:00
Nino van Hooff
c8c4fe65cf Fix two if statements which caused POS settings to be unselectable 2020-03-06 11:00:56 +01:00
Ghostkeeper
a776f54e7f
Fix making settings visible if the default was 0
If the default was 0, then the if statement would evaluate as False and it would not make them visible until you closed and re-opened the panel.

Contributes to issue CURA-7211.
2020-02-13 13:09:57 +01:00
Ghostkeeper
3b235d5536
Make settings visible too after adding them
Contributes to issue CURA-7211.
2020-02-13 13:08:32 +01:00
Jaime van Kessel
00078fd659
Remove a bunch of unused imports 2019-11-08 13:38:42 +01:00
Lipu Fei
30870c5ef2 Refactor skip reset setting
CURA-4760
2018-01-09 17:35:10 +01:00
Aleksei S
117c467829 Fix: Per mesh setting combobox did not save selected option
CURA-4760
2018-01-09 09:39:15 +01:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
fieldOfView
93c5b382ba Fix selecting settings for Per Model Settings with single extrusion printers 2017-05-10 17:37:35 +02:00
Simon Edwards
74e5798509 Lots of import fixes. Eliminated the import hacks such as those used inside UM/Settings/__init__.py.
CURA-2917
2016-12-12 16:05:35 +01:00
Simon Edwards
98a6568313 Merge branch 'master' into python_type_hinting 2016-11-22 11:15:04 +01:00
Simon Edwards
14afd9eab7 Heaps to changes to get the Cura code through the type checker (with minimal checking).
CURA-2917
2016-11-21 21:36:08 +01:00
Ghostkeeper
15792b8f09
Code style: Spaces around binary operators
Also the equal-sign in key-word arguments, though that goes against PEP8, but that's in our code style documentation.

Contributes to issue CURA-2319.
2016-09-22 15:33:17 +02:00
Jaime van Kessel
c13003c960 Switching between stacks now ensures that right value is used for perobject
CURA-2319
2016-09-21 14:15:48 +02:00
Jaime van Kessel
ddc4c73f8b Updated documentation for perobject visiblity
CURA-2319
2016-09-21 13:56:02 +02:00
Jaime van Kessel
6b613fd86b If the stack number is 0 it's now correctly used by perobject settings
CURA-2319
2016-09-21 13:37:41 +02:00
Tim Kuipers
479f9ea6d2 refactor: global_inherits_stack ==> limit_to_extruder (CURA-2308) 2016-09-14 10:46:57 +02:00
Jaime van Kessel
1bafac94bd Value functions are now correcty copied when using per-object settings
CURA-2224
2016-09-07 09:55:22 +02:00
fieldOfView
5c63e5e13f Fix a typo in a comment
CURA-2113
2016-08-11 17:18:43 +02:00
Jaime van Kessel
91dfd971ca PerObject settings don't automatically get a user changed state
CURA-2113
2016-08-11 14:57:21 +02:00
Ghostkeeper
021a33d6bd
Always set value of added setting instance
The value property was sometimes not set. In the default case, this just added an empty setting instance (for a particular key), which appeared to do nothing until you've changed it. This appears correct because if it's not changed then it should be the same as the extruder's value, but if you then change the extruder's value it doesn't update its visible value but still has no value in the setting instance, so the value still falls back to the extruder and the setting ends up different from what is being displayed.

Contributes to issue CURA-1988.
2016-08-05 17:30:22 +02:00
Ghostkeeper
51d972941e
Handle rounding errors in stack_nr
Wouldn't want it to index extruder '1.0'.

Contributes to issue CURA-2067.
2016-08-05 12:05:01 +02:00
Ghostkeeper
92b154f5fe
More defensive check for global_inherits_stack extruder
This should never give the keyerror any more and always default back to non-global_inherits_stack mode.

Contributes to issue CURA-2067.
2016-08-05 11:59:32 +02:00
Ghostkeeper
de7f32da19
Convert global_inherits_stack to int before slicing
Sometimes it was accidentally converted to a float when it passes through Javascript.

Contributes to issue CURA-2055.
2016-08-04 13:25:51 +02:00
Ghostkeeper
ee95e90b4b
Fix display update bug in per-object panel
Setting .value creates a new Python attribute in the object. Setting with setProperty creates the setting property, like we wanted.

Contributes to issue CURA-2011.
2016-08-04 12:36:33 +02:00
Ghostkeeper
d97c9f6e4c
Don't use extruder fallback on single-extrusion machines
Due to a gnawing feeling in the back of my head, I tested this with an UM2 and adding settings failed there. This fixes it.

Contributes to issue CURA-2011.
2016-08-04 11:36:45 +02:00
Ghostkeeper
df1b6b8e88
Only get from extruder if global_inherits_stack is valid
Sometimes it is set to give -1 for some settings.

Contributes to issue CURA-2040.
2016-08-03 10:27:17 +02:00
Ghostkeeper
f568014e67
Add setting with value from support extruder stack
Upon adding the setting (making it visible) it takes the setting from the support extruder stack. It doesn't update afterwards.

Contributes to issue CURA-2011.
2016-08-02 16:49:38 +02:00
Ghostkeeper
5bd3d83c9e
Fix typos in documentation
Contributes to issue CURA-2011.
2016-08-02 16:49:38 +02:00
fieldOfView
c36af13daf Fix PerObjectSettings, which were broken due to the material editing merge
CURA-342
2016-07-07 18:25:20 +02:00
Arjen Hiemstra
38ce6cd4b8 Make PerObjectSettingVisiblityHandler inherit SettingVisiblityHandler and some other cleanup 2016-06-23 13:33:51 +02:00
Jaime van Kessel
1ae69b25fa Added documentation 2016-06-02 16:07:09 +02:00
Jaime van Kessel
89c1136d7f Per object settings can now be added & changed
CURA-1278
2016-05-27 15:28:54 +02:00
Jaime van Kessel
c914446060 Initial changes for perobject stuff
CURA-1278
2016-05-27 11:26:41 +02:00