[messages] [Technical Support & Bugs] PrivateMap doesnt hide on sideChange()

spotlight2001 waltermauritz at gmx.at
Mon May 22 20:51:31 CEST 2017


### Eclipse Workspace Patch 1.0
#P vassal
Index: src/VASSAL/build/module/PrivateMap.java
===================================================================
--- src/VASSAL/build/module/PrivateMap.java	(revision 9251)
+++ src/VASSAL/build/module/PrivateMap.java	(working copy)
@@ -201,10 +201,18 @@
 
   public void sideChanged(String oldSide, String newSide) {
     super.sideChanged(oldSide, newSide);
+    View view = (View) getView();
+    
     ((View)getView()).disableListeners();
     if (isAccessibleTo(newSide)) {
       ((View)getView()).enableListeners();
+      // show private map if player switches to this side
+      theMap.getTopLevelAncestor().setVisible(true);
+    } else {
+    	// hide private map if player switches away from it
+    	theMap.getTopLevelAncestor().setVisible(false);
     }
+    repaint();
     launchButton.setEnabled(isVisibleTo(PlayerRoster.getMySide()));
   }

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=53686#p53686


More information about the messages mailing list