BF [2275464] - Selected printer is not saved in preferences
https://sourceforge.net/tracker/index.php?func=detail&aid=2275464&group_id=176962&atid=879332
This commit is contained in:
parent
a53e0ffa42
commit
70c37297cc
|
@ -174,8 +174,16 @@ public class CPrinter extends CComboBox implements ActionListener
|
|||
* Refresh printer list
|
||||
*/
|
||||
public void refresh() {
|
||||
String current = (String) getSelectedItem();
|
||||
removeAllItems();
|
||||
setModel(new DefaultComboBoxModel(getPrinterNames()));
|
||||
if (current != null) {
|
||||
for (int i = 0; i < getItemCount(); i++) {
|
||||
String item = (String) getItemAt(i);
|
||||
if (item.equals(current))
|
||||
setSelectedIndex(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // CPrinter
|
||||
|
|
Loading…
Reference in New Issue