It has to iterate over all layers and do string comparison to find the index back. Instead we just keep track of the index so this should improve performance a bit.
Instead of making lots of nested if statements, use the if statements as an interruption check. This reduces the indentation a lot and makes it easier to read in my opinion. It also makes it easier to add stuff to these checks.
3rd-party plugins which were manually installed were listed as uninstall-able instead of disable-able. The distinction between plugins which could be installed or disabled was previously made by whether or not it was 3rd party, but is now made by determining the install location.
This is more efficient, because we're not writing every time you modify the list of scripts. It's also more complete, since if you don't modify the list of scripts but just modify one of the settings, that setting change also gets written to the stack after closing the window.
So that you're not getting into a state of viewing an invalid index. If you switch to a printer with 0 scripts attached, the index is still invalid, but it won't display anything then so you're okay.
This causes the button to display immediately on start-up if there were any post-processing scripts in the current machine. If there weren't, then no button will be shown (as specified in the QML).
Previously the QML was only loaded first upon clicking the item in the extensions menu. Now it has to be loaded on start-up in order to display that button.
Since #3068, replacement patterns can take the form of {setting_nr, extruder_nr}. This form was not being recognised when determining if CuraEngine should prepend its own preheat sequence.
- Quit button in the dialog post-install now quits the application instead of simply closing the window
- Improved styling:
- All colors now pulled from `UM.Theme.getColor()`
- Dialog has white background
- Buttons look like Cura buttons
- Removed inaccurate comments regarding the structure that were created while working on it