Issue #3025 - Fix incorrect sort algorithm.
Change-Id: Ied1ec59a8703c1f7476793d3896a253ec6aa2707 Former-commit-id: 9c275288183b93ba5cac991dbbdf72bdf122ad0a
This commit is contained in:
parent
7afb1e66f5
commit
0b9f8ce7f1
1 changed files with 23 additions and 19 deletions
|
@ -104,7 +104,8 @@ import com.raytheon.viz.mpe.ui.dialogs.gagetable.xml.GageTableSortType;
|
|||
* May 28, 2009 2476 mpduff Initial creation.
|
||||
* Mar 08, 2013 15725 snaples Updated to fix resort issues when editing value.
|
||||
* Jan 28, 2014 16994 snaples Updated populateGridCombo to get correct filename prefix for matching up selection.
|
||||
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||
* Feb 02, 2014 16201 snaples Added saved data flag support
|
||||
* Apr 16, 2014 3025 mpduff Fix sort method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -488,8 +489,8 @@ public class GageTableDlg extends JFrame implements IEditTimeChangedListener {
|
|||
for (int i = 0; i < columnData.size(); i++) {
|
||||
if (columnData.get(i).isDataColumn()) {
|
||||
gridCombo.addItem(columnData.get(i).getName());
|
||||
if (selectedGrid
|
||||
.equalsIgnoreCase(columnData.get(i).getProductDescriptor().getProductFilenamePrefix())) {
|
||||
if (selectedGrid.equalsIgnoreCase(columnData.get(i)
|
||||
.getProductDescriptor().getProductFilenamePrefix())) {
|
||||
gridComboSelection = gridSelectionIndex;
|
||||
}
|
||||
gridSelectionIndex++;
|
||||
|
@ -1137,20 +1138,24 @@ public class GageTableDlg extends JFrame implements IEditTimeChangedListener {
|
|||
response = -1;
|
||||
} else {
|
||||
if (ascending) {
|
||||
// Check for equality first
|
||||
response = o1.compareTo(o2);
|
||||
if (response != 0) {
|
||||
if (o1.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = -1;
|
||||
} else if (o2.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = 1;
|
||||
} else {
|
||||
response = o1.compareTo(o2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Check for equality first
|
||||
response = o1.compareTo(o2);
|
||||
if (response != 0) {
|
||||
if (o1.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = 1;
|
||||
} else if (o2.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = -1;
|
||||
} else {
|
||||
response = o2.compareTo(o1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1316,8 +1321,7 @@ public class GageTableDlg extends JFrame implements IEditTimeChangedListener {
|
|||
dispose();
|
||||
}
|
||||
|
||||
public void setDataChanged(boolean dataChanged)
|
||||
{
|
||||
public void setDataChanged(boolean dataChanged) {
|
||||
this.dataChanged = dataChanged;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue