If only one filter is supplied to nameFilters, the index will always be -1. I assume this is because we are not selecting the file type in the Dialog, it just defaults to the only item.
This code should still work if the behaviour is changed in the future.
FileDialog now uses currentFolder instead of folder.
CURA-9214
- When both branches added Controls1 as OldControls, it's not marked as a merge conflict. But the merge removed the need for OldControls, so the import can be removed.
- There was one instance where I had removed the OldControls for a checkbox but there it should remain since the checkboxes are updated in a separate ticket.
Contributes to issue CURA-8684.
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).
This way it is re-useable, and no longer connected to the concept of a tab view.
We can then display it in the profile manager.
Contributes to issue CURA-8686.
This styles it for us automatically.
However the contents of the tab disappears now. I'll have to restore that, but since that moves a bunch of code I'd rather do that in a separate commit.
I also changed the item to a column so that we don't have to link up the anchors very weirdly/difficulty with all of the buttons and messages that are optional. This just automatically makes space if there need to be extra buttons and messages in between, and even deals with the spacing correctly.
Contributes to issue CURA-8686.
I also fixed an undefined reference for whether a button needed to be enabled, if no profile was selected yet. The button was invisible if it was undefined, but it was still giving QML warnings.
Contributes to issue CURA-8686.
When deleting profiles, the current item is set to null.
The Activate button was checking if the current profile was already active, and disabling the button if it was. But the button was still enabled if the current item is null because isCurrentItemActivated is only true if there is a current item. So to properly disable the button we need to check also if there is a current item.
The onItemsChanged signal can also trigger if the item that matches the toSelectItemName has no quality_changes_group, i.e. a built-in profile.
Probably fixes Sentry issue CURA-43.
This class is deprecated. Constructing it here means that the class gets constructed on the Qt thread and makes it inaccessible for the rest.
Contributes to issue CURA-6600.