From: Niki Roo Date: Mon, 29 Feb 2016 15:48:46 +0000 (+0100) Subject: lanterna: update X-Git-Tag: v1.0-beta1~7^2~3 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=b71d13681b087eb23f02f406cb542af7915f9399;p=jvcard.git lanterna: update --- diff --git a/lanterna/2016-02-29 - 16:20 lanterna-master.zip b/lanterna/2016-02-29 - 16:20 lanterna-master.zip new file mode 100644 index 0000000..55f0f8e Binary files /dev/null and b/lanterna/2016-02-29 - 16:20 lanterna-master.zip differ diff --git a/src/com/googlecode/lanterna/graphics/PropertiesTheme.java b/src/com/googlecode/lanterna/graphics/PropertiesTheme.java index 40f61d1..9ac8a60 100644 --- a/src/com/googlecode/lanterna/graphics/PropertiesTheme.java +++ b/src/com/googlecode/lanterna/graphics/PropertiesTheme.java @@ -163,7 +163,8 @@ public final class PropertiesTheme implements Theme { lastElement.backgroundMap.containsKey(name)) { return new StyleImpl(path, name); } - return null; + // If there was no custom style with this name, just return the normal one + return getNormal(); } @Override diff --git a/src/com/googlecode/lanterna/gui2/AbstractWindow.java b/src/com/googlecode/lanterna/gui2/AbstractWindow.java index 6c9c5fd..4e55f3d 100644 --- a/src/com/googlecode/lanterna/gui2/AbstractWindow.java +++ b/src/com/googlecode/lanterna/gui2/AbstractWindow.java @@ -123,7 +123,7 @@ public abstract class AbstractWindow extends AbstractBasePane implements Window getComponent().invalidate(); } setSize(graphics.getSize(), false); - super.draw(graphics); + super.draw(graphics); } @Override diff --git a/src/com/googlecode/lanterna/gui2/InteractableLookupMap.java b/src/com/googlecode/lanterna/gui2/InteractableLookupMap.java index 36d285e..a200a30 100644 --- a/src/com/googlecode/lanterna/gui2/InteractableLookupMap.java +++ b/src/com/googlecode/lanterna/gui2/InteractableLookupMap.java @@ -136,6 +136,10 @@ public class InteractableLookupMap { } } startPosition = interactable.toBasePane(startPosition); + if(startPosition == null) { + // The structure has changed, our interactable is no longer inside the base pane! + return null; + } Set disqualified = getDisqualifiedInteractables(startPosition, true); TerminalSize size = getSize(); int maxShiftLeft = interactable.toBasePane(TerminalPosition.TOP_LEFT_CORNER).getColumn(); @@ -212,6 +216,10 @@ public class InteractableLookupMap { } } startPosition = interactable.toBasePane(startPosition); + if(startPosition == null) { + // The structure has changed, our interactable is no longer inside the base pane! + return null; + } Set disqualified = getDisqualifiedInteractables(startPosition, false); TerminalSize size = getSize(); int maxShiftUp = interactable.toBasePane(TerminalPosition.TOP_LEFT_CORNER).getRow();