PD: Avoid touching the document when opening pad or pocket dialog
This commit is contained in:
@@ -380,22 +380,28 @@ void TaskDressUpParameters::hideOnError()
|
||||
showObject();
|
||||
}
|
||||
|
||||
void TaskDressUpParameters::hideObject()
|
||||
void TaskDressUpParameters::setDressUpVisibility(bool visible)
|
||||
{
|
||||
App::DocumentObject* base = getBase();
|
||||
if(base) {
|
||||
DressUpView->getObject()->Visibility.setValue(false);
|
||||
base->Visibility.setValue(true);
|
||||
if (base) {
|
||||
App::DocumentObject* duv = DressUpView->getObject();
|
||||
if (duv->Visibility.getValue() != visible) {
|
||||
duv->Visibility.setValue(visible);
|
||||
}
|
||||
if (base->Visibility.getValue() == visible) {
|
||||
base->Visibility.setValue(!visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TaskDressUpParameters::hideObject()
|
||||
{
|
||||
setDressUpVisibility(false);
|
||||
}
|
||||
|
||||
void TaskDressUpParameters::showObject()
|
||||
{
|
||||
App::DocumentObject* base = getBase();
|
||||
if (base) {
|
||||
DressUpView->getObject()->Visibility.setValue(true);
|
||||
base->Visibility.setValue(false);
|
||||
}
|
||||
setDressUpVisibility(true);
|
||||
}
|
||||
|
||||
ViewProviderDressUp* TaskDressUpParameters::getDressUpView() const
|
||||
|
||||
@@ -104,6 +104,7 @@ protected:
|
||||
|
||||
private:
|
||||
void tryAddSelection(const std::string& doc, const std::string& obj, const std::string& sub);
|
||||
void setDressUpVisibility(bool visible);
|
||||
|
||||
protected:
|
||||
QWidget* proxy;
|
||||
|
||||
@@ -186,11 +186,10 @@ void TaskExtrudeParameters::setupDialog()
|
||||
|
||||
ui->listWidgetReferences->addAction(unselectShapeFaceAction);
|
||||
ui->listWidgetReferences->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
ui->checkBoxAllFaces->setChecked(ui->listWidgetReferences->count() == 0);
|
||||
|
||||
connectSlots();
|
||||
|
||||
ui->checkBoxAllFaces->setChecked(ui->listWidgetReferences->count() == 0);
|
||||
|
||||
this->propReferenceAxis = &(extrude->ReferenceAxis);
|
||||
|
||||
// Due to signals attached after changes took took into effect we should update the UI now.
|
||||
|
||||
Reference in New Issue
Block a user