From ae89cef011c598145d1a29bb8c286e260ffc5651 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 22 May 2015 21:25:59 +0200 Subject: [PATCH] * Fixed a bug in table sort that could produce a cast error if tables are sorted by skill level. --- .../src/main/java/mage/client/table/TablesPanel.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java index 3904e394f3..d553b6d324 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java @@ -1384,10 +1384,13 @@ class TableTableModel extends AbstractTableModel { @Override public Class getColumnClass(int columnIndex){ - if (columnIndex == 0) { - return Icon.class; - } else { - return String.class; + switch (columnIndex) { + case COLUMN_ICON: + return Icon.class; + case COLUMN_SKILL: + return SkillLevel.class; + default: + return String.class; } }