Proposed solution takes a different approach compared to the previous
solution. Previously there was one message dialog that was hidden by
default. When the import/export material confirm dialog was triggered
the text and body of this message dialog would change.
I did deviate from this pattern as this might introduce hard to debug
issues when a property would be set on this dialog. As this dialog is
used for various instances every instance should update the same
properties. If one property is missed then the popup might show unwanted
information.
I propose a different solution instead. Here a popup is created
dynamically. This way the properties used for each instance is clear.
This might add a delay when showing the popup as the whole component
needs to be created when called.
CURA-8959
Conflicts:
plugins/ImageReader/ConfigUI.qml
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
plugins/PerObjectSettingsTool/SettingPickDialog.qml
resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml
resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
resources/qml/Preferences/GeneralPage.qml
resources/qml/Preferences/Materials/MaterialsPage.qml
resources/qml/Preferences/Materials/MaterialsView.qml
resources/qml/Preferences/ProfilesPage.qml
These conflicts are all arising from headers/includes being updated at the same time, or from the two branches marking the other one's components as needing OldControls.
This introduced more OldControls markers which don't get marked as merge conflicts by Git. This happens when an element could just be left as the original name but from the new import (e.g. a Button stays a Button in Controls 2, but should be marked as from OldControls on the branch that doesn't update the Button).
Took some effort. This was a weird one. I had to manually set the contentHeight to the height of the contents. Perhaps the ScrollBar itself was messing with it?
Contributes to issue CURA-8686.
It now creates a similar dialogue of what the old button did. The dialogue is no longer necessary in the materials page, so I've moved it to here specifically.
Contributes to issue CURA-8609.
Rather than from the QML.
This allows creating this dialogue from a message button without needing to put it in the base application.
Contributes to issue CURA-8609.
Instead of updating the storage path every time you add or remove a removable drive, we now update the storage path every time you press the button to sync. That way this detail has no impact on performance of other parts of Cura if they don't use this button. It also makes the code a bit simpler.
The only downside is that this FileDialog then contains state, instead of automatically syncing with the MaterialManagement property for its folder property. I see that as a lesser of two evils.
Contributes to issue CURA-8055.
Revert "Change file extension to .umm"
This reverts commit 56db7f7144083df4bca77746d7ee30f2a54fda36.
Revert "Re-enable compression"
This reverts commit 62bc9be22bbc5595dbfce69893163c3a0ebc4415.
Revert "Add documentation"
This reverts commit e9031f1aff5d40f3c69ac625edf11963a3253eb8.
Revert "Fix writing bytes to string-stream"
This reverts commit 66b2825a667f9aa9618005d2a5875383a3658f4f.
Revert "Hide button entirely if no export is available"
This reverts commit ec727e1068c3ac2cab7f95fb88c5d4d101e28e17.
Revert "Basic implementation of exporting all materials in a .zip archive"
This reverts commit bdcaef134f556f455f352786123476ec40e3ae4c.
Revert "Implement default path for exporting all materials"
This reverts commit e66783664bf73dd9b1e3c6af6f01321763470d2e.
Revert "Implement a sync button and file dialogue to export all materials"
This reverts commit abba3bdd10a994a1b38bcb426a27ba379febeac7.
Revert "Add notion of whether printers support the material export archive"
This reverts commit f436cb8e7b879a8913b25f2a049413ec0721f1c5.
We can reuse our duplicateMaterial function again but in a simpler way. Also finding the preferred material is simpler with our container tree.
However there seems to be a problem with finding the preferred material; it's not finding generic_pla for UM3 and AA0.4 anyway, and then falls back on a random material. This needs to be fixed in the variant node class.
Contributes to issue CURA-6600.
Just like MaterialManager used to be. There can be only one instance of the page then.
This prevents a crash when Qt deletes the QObject because it's no longer used in the page when you close the preferences screen. But when you open it again it doesn't construct a new one. Now there is always one instance so that's not a problem any more. Also it allows other pages to access this item.
Contributes to issue CURA-6600.
Just like the QualityManagementModel, this class is intended to be used as proxy for the material management page in the preferences. I'm intending to move all relevant pyqtSlots from the material manager into this one. The advantage of this switch is that the material manager had no well-bounded scope and so tended to become a big mess of all sorts of functions. This one has a clear scope: serve as a proxy for the buttons you can press in the preferences screen for materials.
Contributes to issue CURA-6600.
The onActiveMaterialChanged signal is triggered upon loading a material for the first time. This is hard to fix without breaking stuff, so we will revert this part.
This re-introduces a bug where if you change a material diameter such that the material disappears from the list, it is still selected and you can change its properties in the details panel.
Contributes to issue CURA-6679.
In this case, if the user was updating some information in one material
and then select other material, the new data is stored.
Contributes to CURA-5682.