Never animate progress bars if they are invisible

This is now the responsibility of the theme rather than the interface element, since the theme defines the animation itself. This makes it that the interface element doesn't need to worry about things like its style or animation.

Contributes to issue CURA-2497.
This commit is contained in:
Ghostkeeper 2016-10-06 11:54:00 +02:00
parent a39cbb735b
commit 8644fb7113
No known key found for this signature in database
GPG key ID: 701948C5954A7385
2 changed files with 1 additions and 5 deletions

View file

@ -161,10 +161,6 @@ Rectangle
visible: showProgress;
indeterminate:
{
if(!showProgress)
{
return false; //Never be indeterminate when not visible, since that triggers a redraw of the screen.
}
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
{
case "pausing":

View file

@ -237,7 +237,7 @@ QtObject {
SequentialAnimation on x {
id: xAnim
property int animEndPoint: Theme.getSize("message").width - (Theme.getSize("default_margin").width * 2) - Theme.getSize("progressbar_control").width
running: control.indeterminate
running: control.indeterminate && control.visible
loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}