Fix volumeDialog updateSizeInfos not updating when there isn't any PVs.

This commit is contained in:
Chantara Tith 2016-08-08 22:29:55 +07:00 committed by Andrius Štikonas
parent 9d3ddf4e5c
commit 9803797647
1 changed files with 1 additions and 3 deletions

View File

@ -150,9 +150,7 @@ void VolumeDialog::updateSectorInfos()
void VolumeDialog::updateSizeInfos()
{
QStringList checkedPartitions = dialogWidget().listPV().checkedItems();
if (!checkedPartitions.isEmpty()) {
m_TotalSize = FS::lvm2_pv::getPVSize(checkedPartitions);
}
m_TotalSize = FS::lvm2_pv::getPVSize(checkedPartitions);
dialogWidget().totalSize().setText(Capacity::formatByteSize(m_TotalSize));
//Probably a bad design for updating state here; the state should be changed inside the update button function.