mirror of https://github.com/rusefi/RomRaider.git
improve table type handling
- return correct type - fix error on table properties
This commit is contained in:
parent
4e30af5940
commit
798cb43830
|
@ -33,6 +33,7 @@ import javax.swing.JPanel;
|
|||
import javax.swing.JTextArea;
|
||||
|
||||
import com.romraider.Settings;
|
||||
import com.romraider.maps.Table.TableType;
|
||||
import com.romraider.util.ByteUtil;
|
||||
|
||||
import static com.romraider.util.ByteUtil.isBitSet;
|
||||
|
@ -46,7 +47,6 @@ public class TableBitwiseSwitch extends Table {
|
|||
public TableBitwiseSwitch() {
|
||||
super();
|
||||
storageType = 1;
|
||||
type = Settings.TABLE_SWITCH;
|
||||
removeAll();
|
||||
setLayout(new BorderLayout());
|
||||
checkboxes = new ArrayList<JCheckBox>();
|
||||
|
@ -72,8 +72,8 @@ public class TableBitwiseSwitch extends Table {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return Settings.TABLE_SWITCH;
|
||||
public TableType getType() {
|
||||
return Table.TableType.SWITCH;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -48,9 +48,11 @@ public class TablePropertyPanel extends javax.swing.JPanel {
|
|||
if (Table.TableType.SWITCH == table.getType()) {
|
||||
dim = 1;
|
||||
storageSize.setText("switch");
|
||||
if(table.getClass() == TableSwitch.class) {
|
||||
scrollPane.setViewportView(populateScalesTable(
|
||||
((TableSwitch) table).getSwitchStates()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (Settings.STORAGE_TYPE_FLOAT == table.getStorageType()) {
|
||||
storageSize.setText("float");
|
||||
|
|
Loading…
Reference in New Issue