Surface: Fix transaction support of BlendCurvePanel and bind widgets to properties
This commit is contained in:
@@ -89,6 +89,7 @@ BlendCurvePanel::BlendCurvePanel(ViewProviderBlendCurve* vp)
|
||||
|
||||
initControls();
|
||||
setupConnections();
|
||||
bindProperties();
|
||||
}
|
||||
|
||||
BlendCurvePanel::~BlendCurvePanel() = default;
|
||||
@@ -188,6 +189,16 @@ void BlendCurvePanel::initSize()
|
||||
ui->sizeSecondEdge->setValue(fea->EndSize.getValue());
|
||||
}
|
||||
|
||||
void BlendCurvePanel::bindProperties()
|
||||
{
|
||||
auto fea = vp->getObject<Surface::FeatureBlendCurve>();
|
||||
|
||||
ui->paramFirstEdge->bind(fea->StartParameter);
|
||||
ui->sizeFirstEdge->bind(fea->StartSize);
|
||||
ui->paramSecondEdge->bind(fea->EndParameter);
|
||||
ui->sizeSecondEdge->bind(fea->EndSize);
|
||||
}
|
||||
|
||||
void BlendCurvePanel::onFirstEdgeButton(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
@@ -401,8 +412,9 @@ bool BlendCurvePanel::accept()
|
||||
|
||||
bool BlendCurvePanel::reject()
|
||||
{
|
||||
Gui::cmdGuiDocument(vp->getObject(), "resetEdit()");
|
||||
Gui::Command::abortCommand();
|
||||
Gui::cmdGuiDocument(vp->getObject(), "resetEdit()");
|
||||
Gui::Command::updateActive();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ private:
|
||||
void initContinuity();
|
||||
void initParameter();
|
||||
void initSize();
|
||||
void bindProperties();
|
||||
void onFirstEdgeButton(bool checked);
|
||||
void onSecondEdgeButton(bool checked);
|
||||
void onUncheckFirstEdgeButton();
|
||||
|
||||
Reference in New Issue
Block a user