Don't call setText() on the popup text component until it is shown

Performance improvement, impacts profiles.
This commit is contained in:
draxdyn 2016-06-01 16:44:35 +02:00
parent 9513b5bf74
commit 415c8cce7e
2 changed files with 14 additions and 1 deletions

View file

@ -155,6 +155,7 @@ public class MageActionCallback implements ActionCallback {
}
data.locationOnScreen = data.component.getLocationOnScreen();
}
data.popupText.updateText();
tooltipPopup = factory.getPopup(data.component, data.popupText, (int) data.locationOnScreen.getX() + data.popupOffsetX, (int) data.locationOnScreen.getY() + data.popupOffsetY + 40);
tooltipPopup.show();
// hack to get popup to resize to fit text