Change FrameworkModules selection to next module in platform after remove one module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1700 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -358,6 +358,9 @@ public class FpdFileContents {
|
|||||||
if (!cursor.isText()) {
|
if (!cursor.isText()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (cursor.getObject() == null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
String s = cursor.getTextValue();
|
String s = cursor.getTextValue();
|
||||||
if (s.matches(regExpNewLineAndSpaces)) {
|
if (s.matches(regExpNewLineAndSpaces)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -727,7 +727,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
if (selectedRow < 0) {
|
if (selectedRow < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int nextSelection = selectedRow;
|
||||||
|
|
||||||
TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
|
TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
|
||||||
selectedRow = sorter.getModelRowIndex(selectedRow);
|
selectedRow = sorter.getModelRowIndex(selectedRow);
|
||||||
@ -761,7 +761,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
ffc.removeModuleSA(selectedRow);
|
ffc.removeModuleSA(selectedRow);
|
||||||
}
|
}
|
||||||
catch (Exception exp) {
|
catch (Exception exp) {
|
||||||
JOptionPane.showMessageDialog(frame, exp.getCause() + exp.getMessage());
|
JOptionPane.showMessageDialog(frame, exp.getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -780,6 +780,10 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
modelFpdModules.removeRow(selectedRow);
|
modelFpdModules.removeRow(selectedRow);
|
||||||
|
if (nextSelection >= jTableFpdModules.getRowCount()) {
|
||||||
|
nextSelection = jTableFpdModules.getRowCount() - 1;
|
||||||
|
}
|
||||||
|
jTableFpdModules.changeSelection(nextSelection, 0, false, false);
|
||||||
docConsole.setSaved(false);
|
docConsole.setSaved(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,6 @@ import java.awt.BorderLayout;
|
|||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
import javax.swing.DefaultCellEditor;
|
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
Reference in New Issue
Block a user