reverting to previous version that didn't cause freezes

This commit is contained in:
ArsenalNut
2012-09-29 04:30:33 +00:00
parent 95f4fe4c48
commit dc8c4e5d56

View File

@@ -20,8 +20,6 @@ package forge.gui.match.controllers;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.SwingWorker;
import forge.Command;
import forge.Constant;
import forge.Singletons;
@@ -43,27 +41,14 @@ public enum CMessage implements ICDoc {
private final ActionListener actCancel = new ActionListener() {
@Override
public void actionPerformed(final ActionEvent evt) {
// Pull all non-UI actions off off the EDT.
final SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
@Override
public Void doInBackground() {
inputControl.selectButtonCancel();
VMessage.SINGLETON_INSTANCE.getBtnOK().requestFocusInWindow();
return null;
}
};
worker.execute();
}
};
private final ActionListener actOK = new ActionListener() {
@Override
public void actionPerformed(final ActionEvent evt) {
// Pull all non-UI actions off off the EDT.
final SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
@Override
public Void doInBackground() {
inputControl.selectButtonOK();
if (Singletons.getModel().getGameState().getPhaseHandler().isNeedToNextPhase()) {
@@ -72,11 +57,6 @@ public enum CMessage implements ICDoc {
Singletons.getModel().getGameState().getPhaseHandler().nextPhase();
}
VMessage.SINGLETON_INSTANCE.getBtnOK().requestFocusInWindow();
return null;
}
};
worker.execute();
}
};