Try to remember the currently selected device when updating the devices list.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957497
This commit is contained in:
parent
e32146bbb5
commit
4f6f488b6b
|
@ -43,6 +43,8 @@ ListDevices::ListDevices(QWidget* parent) :
|
|||
|
||||
void ListDevices::updateDevices()
|
||||
{
|
||||
int idx = listDevices().currentRow();
|
||||
|
||||
listDevices().clear();
|
||||
|
||||
foreach(const Device* d, pmWidget().previewDevices())
|
||||
|
@ -53,6 +55,9 @@ void ListDevices::updateDevices()
|
|||
item->setToolTip(longText);
|
||||
listDevices().addItem(item);
|
||||
}
|
||||
|
||||
if (idx > -1 && idx < listDevices().count())
|
||||
listDevices().setCurrentRow(idx);
|
||||
}
|
||||
|
||||
void ListDevices::on_m_ListDevices_itemSelectionChanged()
|
||||
|
|
Loading…
Reference in New Issue