GBUI: BuiSystem.back(bwindow) should return popped window

Hi there,



BuiSystem.back(currentwindow) should return the bwindow that was just popped from the stack so you know what the current-active bwindow is. What do you think?



Here a patch how to achieve this:


Index: src/java/com/jmex/bui/BuiSystem.java
===================================================================
--- src/java/com/jmex/bui/BuiSystem.java   (revision 325)
+++ src/java/com/jmex/bui/BuiSystem.java   (working copy)
@@ -192,11 +192,12 @@
      *
      * @param currentWindow BWindow the window we're done with
      */
-    public static void back(final BWindow currentWindow) {
+    public static BWindow back(final BWindow currentWindow) {
         BWindow window = pop();
         addWindow(window);
         window.center();
         currentWindow.dismiss();
+        return window;
     }
 
     /**



Same should push(...) automatically dismiss the pushed window!?!

I can take a look at this when I have time.  It seems to be an easy fix. 



Thanks for the help.  BTW, are you wanting to have access to the code so as to make the fix yourself (since you did find a resolution  :smiley: ).

This change looks straight forward.  If CQ doesn't commit then I will later today.



Thx for submitting a patch!