It's possible that a profile is no longer in the registry by the time it gets to that point in the list if this clean-up is triggered by the very action of deleting a profile.
Fixes Sentry issue CURA-1T5.
The user doesn't know what a global stack is. This is a message that more clearly specifies what is really happening as far as the user can see.
The global stack may be None if this code is executed while there is no active printer. Normally the only time there is no active printer is:
- during first launch, while in the welcome screen
- during start-up until the profiles have been loaded
- if there was a profile corruption of some kind with the active printer.
So this function should not get called during those times. It probably isn't called except for the last case (in which case it's acceptable I guess).
This change is made after a request from a translator what the hell this means.
Contributes to issue CURA-7783.
When importing a profile that doesn't much the current nozzle combination (e.g. importing a 'high'
quality when we have AA0.8 and AA0.4 nozzles), the profile was being accepted and a success message
was shown to the user, but the quality did not show up in the profile list.
This commit fixes that by accepting the quality profile and informing the user that the profile is
not visible due to the current configuration.
CURA-7691
The position argument metadata always be there. However if it's not (because the file is old, or manually modified, or a version upgrade worked incorrectly, or whatever) then we shouldn't crash. We just don't know how to order it correctly then. This tries to repair it as best it can.
This fixes a possible bug, too, if the extruders dictionary weren't iterated over in the order of the extruders. It would sometimes assign the profiles to the wrong extruders then. However I think the dictionary iteration in Python is in order of insertion and we probably insert them in the proper order by accident.
Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
Removes another warning from the log. And it makes the code simpler in this case.
Done during Turbo Testing and Tooling to reduce the number of warnings in our log file.
There were some places where it would return None. Then in the QML it would give a QML error that the null object has no dictionary items.
Contributes to issue CURA-5929.
These strings were recently found to have been confusing to the translators. Improvements are:
- Pulling the (untranslated) error message out of the message sentence. We really want the error message to be at the end so we'll force the translators to translate it as a prefix.
- Remove extra spaces at the end.
- Remove Python logic from within the i18nc call, since gettext doesn't understand that.
Contributes to issue CURA-5741.