use the setters in init() for readonly and move allowed; also, call the setters

in the order the args are in

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115387
This commit is contained in:
Volker Lanz 2010-04-16 09:27:39 +00:00
parent 511c20476c
commit 5e6b74e1af
1 changed files with 3 additions and 3 deletions

View File

@ -73,15 +73,15 @@ PartResizerWidget::PartResizerWidget(QWidget* parent) :
*/
void PartResizerWidget::init(Device& d, Partition& p, qint64 minFirst, qint64 maxLast, bool read_only, bool move_allowed)
{
m_ReadOnly = read_only;
m_MoveAllowed = move_allowed && !read_only;
setDevice(d);
setPartition(p);
setMinimumFirstSector(minFirst);
setMaximumLastSector(maxLast);
setReadOnly(read_only);
setMoveAllowed(move_allowed && !read_only);
setMinimumLength(qMax(partition().sectorsUsed(), partition().minimumSectors()));
setMaximumLength(qMin(totalSectors(), partition().maximumSectors()));