Merge "Issue #3025 - Fix incorrect sort algorithm." into development
Former-commit-id:be79b04b59
[formerlybe79b04b59
[formerly 7ad033ab9c35ea2a169f5041ed2ed1dfae7c63b2]] Former-commit-id:c36a5f7272
Former-commit-id:7d8f18ef18
This commit is contained in:
commit
76bd257011
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) {
|
||||
if (o1.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = -1;
|
||||
} else if (o2.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = 1;
|
||||
} else {
|
||||
response = o1.compareTo(o2);
|
||||
// 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 {
|
||||
if (o1.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = 1;
|
||||
} else if (o2.toString().trim().equalsIgnoreCase("M")) {
|
||||
response = -1;
|
||||
} else {
|
||||
response = o2.compareTo(o1);
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1316,12 +1321,11 @@ public class GageTableDlg extends JFrame implements IEditTimeChangedListener {
|
|||
dispose();
|
||||
}
|
||||
|
||||
public void setDataChanged(boolean dataChanged)
|
||||
{
|
||||
this.dataChanged = dataChanged;
|
||||
public void setDataChanged(boolean dataChanged) {
|
||||
this.dataChanged = dataChanged;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Set the sort order of the columns.
|
||||
*
|
||||
* @param settings
|
||||
|
|
Loading…
Add table
Reference in a new issue