Merge UI fix.

master
Lodici 2014-01-27 16:47:31 +00:00
commit 3fd39e0a8c
2 changed files with 11 additions and 8 deletions

View File

@ -29,7 +29,12 @@ public class MagicGameReport implements Thread.UncaughtExceptionHandler {
// error notification dialogs being created.
private static boolean isRunning = false;
@Override
public void uncaughtException(final Thread th, final Throwable ex) {
reportException(th, ex);
}
public static void reportException(final Thread th, final Throwable ex) {
if (!isRunning) {
isRunning = true;
MagicGameReport.buildReport(MagicGame.getInstance(), th, ex);
@ -45,7 +50,7 @@ public class MagicGameReport implements Thread.UncaughtExceptionHandler {
* Displays a message to user in the event an unexpected exception occurs.
* User can open logs folder and/or Issue tracker directly from this dialog.
*/
private void doNotifyUser() {
private static void doNotifyUser() {
try {
// By specifying a frame the JOptionPane will be shown in the taskbar.
@ -204,7 +209,7 @@ public class MagicGameReport implements Thread.UncaughtExceptionHandler {
}
}
private void grabScreenShot(final Component container) {
private static void grabScreenShot(final Component container) {
if (container != null) {
SwingUtilities.invokeLater(new Runnable() {
@Override

View File

@ -13,6 +13,7 @@ import magic.data.GeneralConfig;
import magic.model.MagicDeck;
import magic.model.MagicDuel;
import magic.model.MagicGame;
import magic.model.MagicGameReport;
import magic.model.MagicPlayerDefinition;
import magic.model.MagicDeckConstructionRule;
import magic.ui.GameLayeredPane;
@ -50,12 +51,9 @@ public class DuelGameScreen extends AbstractScreen implements IMagScreenOptionsM
protected void done() {
try {
setContent(get());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ExecutionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException | ExecutionException e1) {
e1.printStackTrace();
MagicGameReport.reportException(Thread.currentThread(), e1);
}
}