[TD]Cosmetic function overhaul (#14216)
* [TD]Cosmetic geometry and tools update - all cosmetics to store geometry in same form - all cosmetics to survive scaling and rotation - extension functions to survive scaling and rotation * [TD]overhaul leader point storage and editing - add py routine makeLeader(points) * [TD]add leader conversion utility * [TD]Set Leader RotateWithView default to true * [TD]fix intersection vertex position * [TD]add CosmeticEdge::makeLineFromCanonicalPoints * [TD]fix 2 Extension tools - positioning in DrawCosmeticCircle - mishandling of points in execLineParallelPerpendicular * [TD]Remove duplicate constexpr * [TD]fix 2x Cosmetic arc tools * [TD]refactor LineFormat out of Cosmetic * [TD]move cosmetic appearance settings to LineFormat * [TD]remove 2 unused methods * [TD]apply format to blue line & circle tools * [TD]fix ballon arrowhead does not rotate with view * [TD]fix CosmeticCircle3Points * [TD]allow multiple cosmetic object deletions * [TD]fix extend/shorten centerline
This commit is contained in:
@@ -216,12 +216,12 @@ void TaskCenterLine::setUiEdit()
|
||||
QString listItem = Base::Tools::fromStdString(m_edgeName);
|
||||
ui->lstSubList->addItem(listItem);
|
||||
}
|
||||
ui->cpLineColor->setColor(m_cl->m_format.m_color.asValue<QColor>());
|
||||
ui->dsbWeight->setValue(m_cl->m_format.m_weight);
|
||||
ui->cpLineColor->setColor(m_cl->m_format.getColor().asValue<QColor>());
|
||||
ui->dsbWeight->setValue(m_cl->m_format.getWidth());
|
||||
|
||||
DrawGuiUtil::loadLineStyleChoices(ui->cboxStyle);
|
||||
if (ui->cboxStyle->count() >= m_cl->m_format.m_style ) {
|
||||
ui->cboxStyle->setCurrentIndex(m_cl->m_format.m_style - 1);
|
||||
if (ui->cboxStyle->count() >= m_cl->m_format.getStyle() ) {
|
||||
ui->cboxStyle->setCurrentIndex(m_cl->m_format.getStyle() - 1);
|
||||
}
|
||||
|
||||
ui->rbVertical->setChecked(false);
|
||||
@@ -318,7 +318,7 @@ void TaskCenterLine::onColorChanged()
|
||||
|
||||
App::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
m_cl->m_format.m_color.setValue<QColor>(ui->cpLineColor->color());
|
||||
m_cl->m_format.getColor().setValue<QColor>(ui->cpLineColor->color());
|
||||
m_partFeat->recomputeFeature();
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ void TaskCenterLine::onWeightChanged()
|
||||
return;
|
||||
}
|
||||
|
||||
m_cl->m_format.m_weight = ui->dsbWeight->value().getValue();
|
||||
m_cl->m_format.setWidth(ui->dsbWeight->value().getValue());
|
||||
m_partFeat->recomputeFeature();
|
||||
}
|
||||
|
||||
@@ -431,10 +431,10 @@ void TaskCenterLine::createCenterLine()
|
||||
cl->m_flip2Line = false;
|
||||
App::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
cl->m_format.m_color = ac;
|
||||
cl->m_format.m_weight = ui->dsbWeight->value().getValue();
|
||||
cl->m_format.setColor(ac);
|
||||
cl->m_format.setWidth(ui->dsbWeight->value().getValue());
|
||||
cl->m_format.setLineNumber(ui->cboxStyle->currentIndex() + 1);
|
||||
cl->m_format.m_visible = true;
|
||||
cl->m_format.setVisible(true);
|
||||
m_partFeat->addCenterLine(cl);
|
||||
|
||||
m_partFeat->recomputeFeature();
|
||||
@@ -556,10 +556,10 @@ bool TaskCenterLine::reject()
|
||||
}
|
||||
else if (!getCreateMode() && m_partFeat) {
|
||||
// restore the initial centerline
|
||||
m_cl->m_format.m_color = (&orig_cl)->m_format.m_color;
|
||||
m_cl->m_format.m_weight = (&orig_cl)->m_format.m_weight;
|
||||
m_cl->m_format.setColor((&orig_cl)->m_format.getColor());
|
||||
m_cl->m_format.setWidth((&orig_cl)->m_format.getWidth());
|
||||
m_cl->m_format.setLineNumber((&orig_cl)->m_format.getLineNumber());
|
||||
m_cl->m_format.m_visible = (&orig_cl)->m_format.m_visible;
|
||||
m_cl->m_format.setVisible((&orig_cl)->m_format.getVisible());
|
||||
m_cl->m_mode = (&orig_cl)->m_mode;
|
||||
m_cl->m_rotate = (&orig_cl)->m_rotate;
|
||||
m_cl->m_vShift = (&orig_cl)->m_vShift;
|
||||
|
||||
Reference in New Issue
Block a user