RAID level should not be showed when the device is inactive. (i.e. it's not loaded by mdadm).

This commit is contained in:
Caio Carvalho 2018-07-16 15:51:16 -03:00
parent 773cbf6d3b
commit 15f19e818c
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ void InfoPane::showDevice(Qt::DockWidgetArea area, const Device& d)
const SoftwareRAID& raid = static_cast<const SoftwareRAID&>(d);
createLabels(i18nc("@label device", "Volume Type:"), QStringLiteral("RAID"), cols(area), x, y);
createLabels(i18nc("@label device", "Capacity:"), Capacity::formatByteSize(raid.capacity()), cols(area), x, y);
createLabels(i18nc("@label device", "RAID Level:"), QString::number(raid.raidLevel()), cols(area), x, y);
createLabels(i18nc("@label device", "RAID Level:"), raid.raidLevel() < 0 ? QStringLiteral("---") : QString::number(raid.raidLevel()), cols(area), x, y);
createLabels(i18nc("@label device", "Chunk Size:"),Capacity::formatByteSize(raid.chunkSize()), cols(area), x, y);
createLabels(i18nc("@label device", "Total Chunk:"), Capacity::formatByteSize(raid.totalChunk()), cols(area), x, y);
createLabels(i18nc("@label device", "Array Size:"), Capacity::formatByteSize(raid.arraySize()), cols(area), x, y);