v0.6.2: adjusted action indicator to be more crash resistant
This commit is contained in:
parent
b24e44db3d
commit
3e5c69b25e
|
@ -60,6 +60,8 @@ public class ActionIndicator extends Tag {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean needsLayout = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
super.update();
|
super.update();
|
||||||
|
@ -77,6 +79,11 @@ public class ActionIndicator extends Tag {
|
||||||
} else {
|
} else {
|
||||||
visible = action != null;
|
visible = action != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (needsLayout){
|
||||||
|
layout();
|
||||||
|
needsLayout = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -103,7 +110,7 @@ public class ActionIndicator extends Tag {
|
||||||
}
|
}
|
||||||
if (action != null){
|
if (action != null){
|
||||||
instance.icon = action.getIcon();
|
instance.icon = action.getIcon();
|
||||||
instance.layout();
|
instance.needsLayout = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user