fix #51, protect animations signaling

--when a task is removed too fast then some
animations were not informed that had ended.
So there was an addition animation signal but
no removal animation signal. This fix protects
this in two different cases
--the normal state also from now own uses only
the animations states and no the hovered task
indicator. This simplifies things a lot and probably
creates also a much robust experience.
pull/1/head
Michail Vourlakos 8 years ago
parent 4bebad4f82
commit 6aa17ad9ed

@ -119,15 +119,13 @@ Item{
var localX = 0;
var localY = 0;
normalState = ((root.nowDockHoveredIndex === -1) && (layoutsContainer.hoveredIndex === -1)
&& (root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0))
normalState = ((root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0))
|| !windowSystem.compositingActive;
// debug maskArea criteria
if (debugMagager) {
console.log(root.nowDockHoveredIndex + ", " + layoutsContainer.hoveredIndex + ", "
+ root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " + root.animationsNeedThickness +
", " + dock.visibility.isHidden);
console.log(root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " +
root.animationsNeedThickness + ", " + dock.visibility.isHidden);
if (previoiusNormalState !== normalState) {
console.log("normal state changed to:" + normalState);

@ -954,6 +954,14 @@ MouseArea{
init();
start();
}
Component.onDestruction: {
if (animationSent){
//console.log("SAFETY REMOVAL 2: animation removing ended");
animationSent = false;
root.signalAnimationsNeedLength(-1);
}
}
}
//A Timer to check how much time the task is hovered in order to check if we must
@ -1084,7 +1092,18 @@ MouseArea{
}
PropertyAction { target: mainItemContainer; property: "inAnimation"; value: false }
ScriptAction{script:{root.signalAnimationsNeedLength(-1)}}
ScriptAction{
script:{
if (showWindowAnimation.animationSent){
//console.log("SAFETY REMOVAL 1: animation removing ended");
showWindowAnimation.animationSent = false;
root.signalAnimationsNeedLength(-1);
}
root.signalAnimationsNeedLength(-1)
}
}
PropertyAction { target: mainItemContainer; property: "ListView.delayRemove"; value: false }
PropertyAction { target: icList; property: "delayingRemoval"; value: false }
}

Loading…
Cancel
Save