|
|
|
@ -48,6 +48,7 @@
|
|
|
|
|
|
|
|
|
|
#include <kpmcore/core/device.h>
|
|
|
|
|
#include <kpmcore/core/partition.h>
|
|
|
|
|
#include <kpmcore/core/softwareraid.h>
|
|
|
|
|
|
|
|
|
|
#include <QBoxLayout>
|
|
|
|
|
#include <QButtonGroup>
|
|
|
|
@ -1182,6 +1183,11 @@ ChoicePage::setupActions()
|
|
|
|
|
bool atLeastOneCanBeResized = false;
|
|
|
|
|
bool atLeastOneCanBeReplaced = false;
|
|
|
|
|
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
|
|
|
|
bool isInactiveRAID = false;
|
|
|
|
|
|
|
|
|
|
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
|
|
|
|
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
|
|
|
|
isInactiveRAID = true;
|
|
|
|
|
|
|
|
|
|
for ( auto it = PartitionIterator::begin( currentDevice );
|
|
|
|
|
it != PartitionIterator::end( currentDevice ); ++it )
|
|
|
|
@ -1305,7 +1311,7 @@ ChoicePage::setupActions()
|
|
|
|
|
else
|
|
|
|
|
force_uncheck( m_grp, m_alongsideButton );
|
|
|
|
|
|
|
|
|
|
if ( !atLeastOneIsMounted )
|
|
|
|
|
if ( !atLeastOneIsMounted && !isInactiveRAID )
|
|
|
|
|
m_eraseButton->show(); // None mounted
|
|
|
|
|
else
|
|
|
|
|
force_uncheck( m_grp, m_eraseButton );
|
|
|
|
|