- ensure the bug reporting dialog is wide enough to see the 'Exit Application' button

- better handling of nulls when updating the shown card in tables
This commit is contained in:
myk
2013-02-20 22:31:42 +00:00
parent 628088bf8b
commit 00f945b3db
2 changed files with 12 additions and 10 deletions

View File

@@ -90,7 +90,7 @@ public class BugReporter {
_buildSpoilerFooter(sb);
_showDialog("Report a crash", sb.toString(), false);
_showDialog("Report a crash", sb.toString(), true);
}
/**
@@ -222,7 +222,7 @@ public class BugReporter {
JOptionPane pane = new JOptionPane(p, JOptionPane.PLAIN_MESSAGE,
JOptionPane.DEFAULT_OPTION, null, options.toArray(), options.get(0));
JDialog dlg = pane.createDialog(null, title);
dlg.setSize(600, 500);
dlg.setSize(780, 500);
dlg.setResizable(true);
dlg.setLocationRelativeTo(null);
dlg.setVisible(true);

View File

@@ -191,14 +191,16 @@ public final class EditorTableModel<T extends InventoryItem> extends AbstractTab
public void showSelectedCard(final JTable table) {
final int row = table.getSelectedRow();
if (row != -1) {
final T cp = this.rowToCard(row).getKey();
if (cp instanceof CardPrinted) {
CDeckEditorUI.SINGLETON_INSTANCE.setCard(((CardPrinted) cp).getMatchingForgeCard());
}
else if (cp != null) {
CDeckEditorUI.SINGLETON_INSTANCE.setCard(cp);
}
else {
Entry<T, Integer> card = this.rowToCard(row);
if (null != card) {
T cp = card.getKey();
if (cp instanceof CardPrinted) {
CDeckEditorUI.SINGLETON_INSTANCE.setCard(((CardPrinted) cp).getMatchingForgeCard());
}
else {
CDeckEditorUI.SINGLETON_INSTANCE.setCard(cp);
}
} else {
CDeckEditorUI.SINGLETON_INSTANCE.setCard((Card)null);
}
}