This reverts commit 35d6aad6cd7e8a16fbb829dcf8f0b70db12d0028.
This is causing a very weird crash when autoslice is enabled:
2021-01-28 12:12:35,379 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-01-28 12:12:35,379 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: Traceback (most recent call last):
2021-01-28 12:12:35,379 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: File "/home/trin/Gedeeld/Projects/Cura/plugins/CuraEngineBackend/CuraEngineBackend.py", line 270, in slice
2021-01-28 12:12:35,380 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: self._createSnapshot()
2021-01-28 12:12:35,380 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: File "/home/trin/Gedeeld/Projects/Cura/cura/Utils/Threading.py", line 31, in _call_on_qt_thread_wrapper
2021-01-28 12:12:35,380 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: return func(*args, **kwargs)
2021-01-28 12:12:35,380 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: File "/home/trin/Gedeeld/Projects/Cura/plugins/CuraEngineBackend/CuraEngineBackend.py", line 254, in _createSnapshot
2021-01-28 12:12:35,380 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: if not CuraApplication.getInstance().isVisible:
2021-01-28 12:12:35,380 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'CuraApplication' object has no attribute 'isVisible'
The property exists all right. It's in the dir() of the CuraApplication instance. PyCharm's debug mode also gives a traceback when trying to evaluate the property. It clearly thinks it's there, but then it's not or something. Very weird. We need to take a better look at this than this quick fix.
We're getting some reports that people are suddenly logged out. The working
theory is that they are mixing staging & production builds. This logging
should tell us enough to find out if that is the case!
After changing this with fvrmr together I read back on the commit and realised that the sentence was literally saying that it affects adhesion, and then that it doesn't affect adhesion. I hope this clarifies that a bit better by giving examples.
Opening a .3mf file or other project would cause a crash if the preference for always opening as a project (as opposed to importing models or 'always ask') was set. Traced back to a typo.
CURA-7987
Circumvents the snapshot/thumbnail not working when the focus is not on the main window, even if the thread is main. This was an issue when writing a file to Digital Factory becasue that workflow uses a modal window.
Thanks for the idea Jelle!
In some cases, UFP-writing is going to be done when the OpenGL-context is off the main window. This doesn't work. That unfortunately also goes for this commit, but it's a work in progress.
Or else the LocalFileOutputDevice will output a mesh 3mf file and not a Cura 3mf project when
being called from the 'File -> Save Project -> To Disk' submenu item.
CURA-7865
While generating UFP files from outside the main thread, the snapshot generation crashes Cura
due to the OpenGL context.
To avoid that, for the time being, we comment out the generation of the snapshot.
CURA-7865
JSON dictionaries need to have a certain structure such as strings as keys. If that's not correct it gives a TypeError. Don't crash on those; give a similar error message as when the values in the JSON are invalid.
The Cura.ComboBox component can now display a default text when there are no items in its model
and another text when there is no item selected.
CURA-7865