[TD] sanitize Scale preferences
- take care that custom scale is only in effect if the scale type is 'Custom' - use UnitSpinBox for Template Mark - use uniform width for all scale edits - also use UnitSpinBox for Balloon Kink
This commit is contained in:
@@ -34,8 +34,10 @@ DlgPrefsTechDraw2Imp::DlgPrefsTechDraw2Imp( QWidget* parent )
|
||||
: PreferencePage( parent )
|
||||
{
|
||||
this->setupUi(this);
|
||||
// pdsbTemplateMark->setUnit(Base::Unit::Length);
|
||||
|
||||
this->pdsbTemplateMark->setUnit(Base::Unit::Length);
|
||||
connect(this->cbViewScaleType, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(onScaleTypeChanged(int)));
|
||||
}
|
||||
|
||||
DlgPrefsTechDraw2Imp::~DlgPrefsTechDraw2Imp()
|
||||
@@ -43,6 +45,16 @@ DlgPrefsTechDraw2Imp::~DlgPrefsTechDraw2Imp()
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
||||
void DlgPrefsTechDraw2Imp::onScaleTypeChanged(int index)
|
||||
{
|
||||
// disable custom scale if the scale type is not custom
|
||||
|
||||
if (index == 2) // if custom
|
||||
this->pdsbViewScale->setEnabled(true);
|
||||
else
|
||||
this->pdsbViewScale->setEnabled(false);
|
||||
}
|
||||
|
||||
void DlgPrefsTechDraw2Imp::saveSettings()
|
||||
{
|
||||
pdsbToleranceScale->onSave();
|
||||
|
||||
Reference in New Issue
Block a user