Only load loading.gif when needed

Toolbox crashes on Mac OS X due to reaching the max limit of file
handlers. This seems to be caused by the loading the "loading.gif"
animation image. Probably because many widgets are created and each of
them has an animation image, and Qt (5.8?) seems to load everything at
the same time.
This commit is contained in:
Lipu Fei 2018-05-31 12:21:51 +02:00
parent 00fe180085
commit a468fc2cc4

View File

@ -150,7 +150,7 @@ Item
{ {
id: loader id: loader
visible: active visible: active
source: "../images/loading.gif" source: visible ? "../images/loading.gif" : ""
width: UM.Theme.getSize("toolbox_loader").width width: UM.Theme.getSize("toolbox_loader").width
height: UM.Theme.getSize("toolbox_loader").height height: UM.Theme.getSize("toolbox_loader").height
anchors.right: button.left anchors.right: button.left