Change-Id: Ia50dedd9b2a8340403131596ebb0e73b21c5ba90

Former-commit-id: d5895a1ab0 [formerly 962ead39bb] [formerly d5895a1ab0 [formerly 962ead39bb] [formerly 226c767f96 [formerly eabfef02dc20e810ca9731a77bb96d73a800503b]]]
Former-commit-id: 226c767f96
Former-commit-id: 5f09b6bcb3 [formerly 4b750e5788]
Former-commit-id: c058d2921b
This commit is contained in:
Loubna.Bousaidi 2013-12-23 20:30:13 +00:00
parent 961d6b625e
commit 1691ca156a

View file

@ -1,4 +1,4 @@
/** /**
* This software was developed and / or modified by Raytheon Company, * This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government. * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
* *
@ -81,7 +81,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Oct 27,2011 11305 lbousaidi change some logic to have physical * Oct 27,2011 11305 lbousaidi change some logic to have physical
* elements matches the selection of default limits * elements matches the selection of default limits
* Apr 19, 2013 1790 rferrel Make dialog non-blocking. * Apr 19, 2013 1790 rferrel Make dialog non-blocking.
* * Nov 26, 2013 15800 wkwock Fix unhandled event loop
* </pre> * </pre>
* *
* @author lvenable * @author lvenable
@ -1329,7 +1329,23 @@ public class QcAlertAlarmLimitsDlg extends CaveSWTDialog {
if (success) { if (success) {
// Reload the data keeping the selection // Reload the data keeping the selection
selection = limitsList.getSelectionIndex(); selection = limitsList.getSelectionIndex();
String currentItem=locationSelItemTF.getText();
loadData(true); loadData(true);
if (selection<0) {//must be new item
int index = 0 ;
for (index=0; index<limitsList.getItemCount();index++) {
String item = limitsList.getItem(index);
if (item.trim().split(" ")[0].compareToIgnoreCase(currentItem)==0)
break; //found the index
}
if (index>=limitsList.getItemCount())
selection=0;
else
selection = index;
}
limitsList.setSelection(selection); limitsList.setSelection(selection);
getSelectedLimit(); getSelectedLimit();
} }