X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWidget.java;fp=src%2Fjexer%2FTWidget.java;h=60bc3e4a618c0cce09d84cbdbedfdc200da39906;hb=9917c620116aa68ebf5d74afaeec44416b314729;hp=ba18989bfc43d38ea0549e42f5f20dfb8358e1ab;hpb=955c55b766a8aebb528d5af5f7582a857c72e2f5;p=fanfix.git diff --git a/src/jexer/TWidget.java b/src/jexer/TWidget.java index ba18989..60bc3e4 100644 --- a/src/jexer/TWidget.java +++ b/src/jexer/TWidget.java @@ -1475,6 +1475,19 @@ public abstract class TWidget implements Comparable { } } + /** + * Make this widget, all of its parents, the active child. + */ + public final void activateAll() { + activate(); + if (parent == this) { + return; + } + if (parent != null) { + parent.activateAll(); + } + } + /** * Switch the active widget with the next in the tab order. * @@ -1605,11 +1618,10 @@ public abstract class TWidget implements Comparable { splitPane.setLeft(this); splitPane.setRight(newWidget); } - splitPane.activate(); if (newWidget != null) { - newWidget.activate(); + newWidget.activateAll(); } else { - activate(); + activateAll(); } assert (parent != null); @@ -1657,11 +1669,10 @@ public abstract class TWidget implements Comparable { splitPane.setTop(this); splitPane.setBottom(newWidget); } - splitPane.activate(); if (newWidget != null) { - newWidget.activate(); + newWidget.activateAll(); } else { - activate(); + activateAll(); } assert (parent != null);