[TD]Fix handling of CL flip parameter

This commit is contained in:
wandererfan
2020-03-20 20:40:09 -04:00
committed by WandererFan
parent 8451cb332a
commit 26ea08e8c5
2 changed files with 25 additions and 14 deletions

View File

@@ -185,6 +185,7 @@ void TaskCenterLine::setUiPrimary()
ui->rbAligned->setEnabled(false);
else
ui->rbAligned->setEnabled(true);
if (m_type == 1) // only if line, feature is enabled
ui->cbFlip->setEnabled(true);
else
@@ -238,6 +239,7 @@ void TaskCenterLine::setUiEdit()
ui->cbFlip->setChecked(true);
else
ui->cbFlip->setChecked(false);
if (m_cl->m_type == 1) // only if line, feature is enabled
ui->cbFlip->setEnabled(true);
else
@@ -264,14 +266,16 @@ void TaskCenterLine::createCenterLine(void)
m_mode = CenterLine::CLMODE::ALIGNED;
}
bool flip = ui->cbFlip->isChecked();
TechDraw::CenterLine* cl = CenterLine::CenterLineBuilder(m_partFeat,
m_subNames,
m_mode);
m_mode,
flip);
if (cl != nullptr) {
cl->setShifts(hShift, vShift);
cl->setExtend(extendBy);
cl->setRotate(rotate);
cl->m_flip2Line = ui->cbFlip->checkState();
cl->m_flip2Line = ui->cbFlip->isChecked();
App::Color ac;
ac.setValue<QColor>(ui->cpLineColor->color());
cl->m_format.m_color = ac;
@@ -310,7 +314,7 @@ void TaskCenterLine::updateCenterLine(void)
m_cl->m_hShift = ui->qsbHorizShift->rawValue();
m_cl->m_extendBy = ui->qsbExtend->rawValue();
m_cl->m_type = m_type;
m_cl->m_flip2Line = ui->cbFlip->checkState();
m_cl->m_flip2Line = ui->cbFlip->isChecked();
m_partFeat->replaceCenterLine(m_cl);
m_partFeat->refreshCLGeoms();
m_partFeat->requestPaint();