Inline skin selector repaired.

This commit is contained in:
Doublestrike
2012-02-15 11:02:53 +00:00
parent 9ccfc932ad
commit b70fd7175c
2 changed files with 12 additions and 8 deletions

View File

@@ -15,6 +15,7 @@ import javax.swing.event.ListSelectionListener;
import forge.Command;
import forge.Constant;
import forge.Singletons;
import forge.control.FControl;
import forge.properties.ForgePreferences;
import forge.properties.ForgePreferences.FPref;
import forge.view.home.ViewSettings;
@@ -217,10 +218,8 @@ public class ControlSettings {
@Override
protected void done() {
view.getLblTitleSkin().setIcon(null);
view.getLblTitleSkin().setText("Choose Skin");
Singletons.getControl().changeState(0);
Singletons.getView().instantiateCachedUIStates();
Singletons.getControl().changeState(FControl.HOME_SCREEN);
Singletons.getView().getHomeView().showSettingsMenu();
}
};

View File

@@ -101,10 +101,7 @@ public final class FView extends JFrame {
FView.this.lpnContent.add(overlay, JLayeredPane.MODAL_LAYER);
// Instantiate all different state screens
FView.this.home = new ViewHomeUI();
FView.this.match = new ViewMatchUI();
FView.this.editor = new ViewEditorUI();
FView.this.bazaar = new ViewBazaarUI();
instantiateCachedUIStates();
// All is ready to go - fire up home screen and discard splash frame.
Singletons.getControl().changeState(FControl.HOME_SCREEN);
@@ -178,4 +175,12 @@ public final class FView extends JFrame {
}
return FView.this.bazaar;
}
/** Like it says. */
public void instantiateCachedUIStates() {
FView.this.home = new ViewHomeUI();
FView.this.match = new ViewMatchUI();
FView.this.editor = new ViewEditorUI();
FView.this.bazaar = new ViewBazaarUI();
}
}