From 14b45107ce31e7b02c13500f6067618eb9ea1046 Mon Sep 17 00:00:00 2001 From: kgoao Date: Thu, 6 Oct 2016 13:06:16 +0200 Subject: [PATCH] FEM: ConstraintPressure: Arrow direction bug fix --- src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp | 9 +++++++++ src/Mod/Fem/Gui/TaskFemConstraintPressure.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp index edbc82d72..2da2b11cb 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp @@ -72,6 +72,9 @@ TaskFemConstraintPressure::TaskFemConstraintPressure(ViewProviderFemConstraintPr connect(ui->lw_references, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(setSelection(QListWidgetItem*))); + connect(ui->checkBoxReverse, SIGNAL(toggled(bool)), + this, SLOT(onCheckReverse(bool))); + this->groupLayout()->addWidget(proxy); /* Note: */ @@ -119,6 +122,12 @@ void TaskFemConstraintPressure::updateUI() } } +void TaskFemConstraintPressure::onCheckReverse(const bool pressed) +{ + Fem::ConstraintPressure* pcConstraint = static_cast(ConstraintView->getObject()); + pcConstraint->Reversed.setValue(pressed); + } + void TaskFemConstraintPressure::addToSelection() { std::vector selection = Gui::Selection().getSelectionEx(); //gets vector of selected objects of active document diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.h b/src/Mod/Fem/Gui/TaskFemConstraintPressure.h index 6d21d31ec..085615450 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.h @@ -57,6 +57,7 @@ public: private Q_SLOTS: void onReferenceDeleted(void); + void onCheckReverse(bool); void addToSelection(); void removeFromSelection(); void setSelection(QListWidgetItem* item);