54 Commits

Author SHA1 Message Date
Ghostkeeper
485e37e7f5
Extruders can be undefined, not null
This happens when the printer is changed, such as when changing the Machine Width in the machine settings dialogue. It updates these menus then and if not all extruders are defined it'll give the following errors:
2020-03-20 16:56:57,839 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/SettingsMenu.qml:51: TypeError: Cannot read property 'isEnabled' of undefined
2020-03-20 16:56:57,840 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/SettingsMenu.qml:44: TypeError: Cannot read property 'isEnabled' of undefined
2020-03-20 16:56:57,841 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/MaterialMenu.qml:26: TypeError: Cannot read property 'isEnabled' of undefined
2020-03-20 16:56:57,841 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/MaterialMenu.qml:28: TypeError: Cannot read property 'material' of undefined

Done during Turbo Testing and Tooling.
2020-03-20 17:03:08 +01:00
Kostas Karmas
dbab3c6e8b Add more materials from Marketplace menu button
This commit adds a button "Add more materials from Marketplace" in the
menu that pops up in the material list while configuring the materials
into custom ones. The button redirects the user to the Marketplace
materials page (https://marketplace.ultimaker.com/app/cura/materials)

CURA-7027
2020-01-15 11:50:59 +01:00
Lipu Fei
4f91389941 Fix QML warnings 2020-01-07 11:37:37 +01:00
Jaime van Kessel
6afd669389
Speed up QMl binding evaluation for MaterialMenu 2020-01-03 16:24:56 +01:00
Lipu Fei
86ff7443cf Fix QML undefined errors 2019-10-16 10:36:36 +02:00
Jaime van Kessel
07a20e131a
Prevent changing material / variant of disabled extruder
It is disabled, so changing it's material / variant doesn't make that much sense...

CURA-6872
2019-10-10 13:03:39 +02:00
Jaime van Kessel
a4ed51342c
Fix favorite not being checked properly in MaterialMenu
CURA-6804
2019-09-23 11:18:47 +02:00
Remco Burema
37aca7d361 Menu items should be removed by index, not by object.
part of CURA-6791
2019-09-19 17:00:16 +02:00
Jaime van Kessel
e7609fadf4 Deprecated the allActiveMaterialIds and replaced the single location where it was used
CURA-6600
2019-08-21 17:08:35 +02:00
Jaime van Kessel
41f2a0e222 Add a property to temporarily disable the material models from updating.
This allows the QMl to stop the updating when it's not even visible
2019-02-21 20:47:38 +01:00
Jaime van Kessel
48ed9b6e20 Remove usage of plugin model 2019-02-21 17:16:59 +01:00
Jaime van Kessel
d9c4edf093 Prevent a few expensive conversions from happening in the QML 2019-02-21 16:36:14 +01:00
Jaime van Kessel
27370dd45d Improve the bindings for the material menu
This way the evaluation is significantly faster.
2019-02-21 15:26:25 +01:00
Ian Paschal
694cc91ae9 Add a "Favorites" heading to materials menu
Contributes to CURA-5162

Also fixed some non i18n strings
2018-08-28 11:21:47 +02:00
Ian Paschal
56a5f59964 Cleaner code
I was hoping to completely nix the generic materials model (since it's basically just a brand "Generic", but then in the QML it has to be have the same in terms of sub-menus or fold-outs and that looked stupid (Generic -> ABS -> ABS)). So we keep that one for now. It is cleaner though.

Contributes to CURA-5162, CURA-5378
2018-08-23 16:39:40 +02:00
Ian Paschal
e8cda90021 Add favorites to materials menu
Contributes to CURA-5162
2018-08-16 13:04:58 +02:00
Diego Prado Gesto
a4b46be2c5 CURA-5427 Force the material models to update when the machine changes and so
when the extruder stack changes.
- What happen was that when the extruder model needed to update, the
material model was not updated correctly and so when changing a material, the
node was incorrect.
2018-06-01 12:58:08 +02:00
Jaime van Kessel
2de587a8c6 Made some changes so the code also works with lower versions of Qt & pyQt 2018-03-05 15:32:46 +01:00
Lipu Fei
8dfa52f15c Fix material menu model extruder binding and initial update 2018-02-22 20:58:54 +01:00
Jack Ha
b9e7ee18a6 CURA-4606 fixed menu setting nozzle 2018-02-20 13:06:54 +01:00
Jack Ha
8aab8f4394 CURA-4606 cleanup and optimization for replaceContainer 2018-02-16 14:23:11 +01:00
Jack Ha
27169e883c CURA-4606 Ensure the correct material is highlighted in the material menu 2018-02-16 14:23:10 +01:00
Lipu Fei
f0d9fba2f5 WIP: Create MaterialManager 2018-02-16 14:20:02 +01:00
fieldOfView
259b1091f6 Fix QML errors building the material and nozzle menus
Since the network rewrite, outputdevices no longer have hotends and materials. This functionality may return, but until that time this does a better job at checking if the properties exist, preventing QML errors.
2018-01-17 19:36:20 +01:00
Lipu Fei
f6168c07f0 Fix material_diameter bindings for metarial menu and page
CURA-4708
2018-01-03 11:27:30 +01:00
Ghostkeeper
dad99f5292
Merge branch 'master' into feature_local_container_server
Contributes to issue CURA-4243.
2017-11-29 13:06:08 +01:00
Ghostkeeper
e0f0e098ff
Use MaterialsModel for materialsModel
This specialized InstanceContainersModel has an override that makes the model a bit more efficient when non-materials get their metadata updated.

Contributes to issue CURA-4243.
2017-11-27 09:54:40 +01:00
Chris ter Beke
9806ec7374 Resolve merge conflicts with master - CURA-4482 2017-10-31 09:22:03 +01:00
ChrisTerBeke
d718e6e36c Create extruder stack for single extruder machines on start - CURA-4482 2017-10-31 09:08:20 +01:00
Diego Prado Gesto
87ba4056ee CURA-4485 Minor changes 2017-10-25 13:55:30 +02:00
fieldOfView
ff847aa329 Fix qml error when there is no connected printer
Also fixes code style
2017-10-25 11:52:43 +02:00
Diego Prado Gesto
0eedfa5c18 CURA-4485 Disabling automatic material and variant when connecting to a
printer within a cluster of more than 1 printer.
2017-10-24 15:45:20 +02:00
Jaime van Kessel
437da52f65 Merge branch 'fix_multiple_extruder_issues' of github.com:Ultimaker/Cura into 3.0 2017-09-29 15:17:11 +02:00
Diego Prado Gesto
f0e89b7e01 Reverted a previous workaround that fixed errors when selecting material and variants in the application menus - CURA-4386 CURA-4379 2017-09-29 09:40:54 +02:00
ChrisTerBeke
1b8766b953 CURA-4386 CURA-4379 change stack behaviours to fix crashes 2017-09-28 16:00:16 +02:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
fieldOfView
8d72ba5fe7 Fix setting material of non-active extruder through menu 2017-08-08 11:32:34 +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
fieldOfView
e92aaca7b6 Filter materials by the (approximate) material diameter of the printer
If a machine defines material diameter of 2.85mm, there is no use to show the 1.75mm materials and vice-versa
2017-04-12 23:03:58 +02:00
Ghostkeeper
4fdaf734fc
Make translation hint a bit more clear for translators
The old message didn't really say anything useful.

Contributes to issue CURA-3138.
2016-12-16 10:58:13 +01:00
Ghostkeeper
48b57de6df
Filter materials on compatibility for non-machine-specific materials
This only listens to whether the 'base' XML profile is marked as compatible in its metadata, but since the machine doesn't have its own materials, the base is the only one that exists. This needs to be changed when we change the filtering on fdmprinter, hence the comment in the code.

Contributes to issue CURA-2837.
2016-10-31 17:26:36 +01:00
fieldOfView
0af26cc4a7 Prevent qml warning when no printer is connected 2016-09-15 13:15:19 +02:00
fieldOfView
cf7a6730d1 Add a menuitem to load the nozzle/material loaded on the printer
CURA-2276
2016-09-14 17:39:49 +02:00
fieldOfView
2bd53d4ce4 Add stub (invisible) menuitems to get material/nozzle from printer
In preparation to stringfreeze. CURA-2276
2016-09-13 09:25:10 +02:00
Jack Ha
d173952a3a Update materialmenu when changing material type. Contributes to CURA-2159 2016-09-12 14:40:32 +02:00
fieldOfView
8b7a8327e8 Allow machinedefinitions to specify another definition to inherit qualities from
CURA-1780
2016-09-08 18:49:34 +02:00
fieldOfView
25fb4d0b27 Show generic materials by display name instead of by material 2016-08-30 18:39:02 +02:00
fieldOfView
b004c53c6d Fix upadting list of materials when switching printers
CURA-2209
2016-08-30 14:42:43 +02:00
fieldOfView
71a77c1fb7 Decrease number of instances of InstanceContainerModel
Updates to InstanceContainerModel are becoming expensive because there are so many instances of that model. The MaterialMenu used three, and the MaterialMenu is instantiated three times for a dual extrusion printer.

CURA-2193
2016-08-29 15:35:14 +02:00
fieldOfView
3b1c11bfcf Put materials into branded material submenus
CURA-2194
2016-08-26 15:43:50 +02:00