Fix assert failure when recreating partition table

This commit is contained in:
Aurélien Gâteau 2014-07-29 15:54:48 +02:00
parent 4b1975d3e2
commit e3a52745fc

View File

@ -114,7 +114,7 @@ PartitionPage::updateButtons()
void
PartitionPage::onNewPartitionTableClicked()
{
QModelIndex index = m_ui->deviceComboBox->view()->currentIndex();
QModelIndex index = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 );
Q_ASSERT( index.isValid() );
Device* device = m_core->deviceModel()->deviceForIndex( index );