FEM: constraint dialogs: sort out commonly used function

additionally remove double code from TaskFemConstraintForce.cpp
This commit is contained in:
donovaly
2020-02-24 20:12:10 +01:00
committed by Bernd Hahnebach
parent f13db9f63a
commit d19d5b5fce
20 changed files with 23 additions and 196 deletions

View File

@@ -230,24 +230,6 @@ void TaskFemConstraintFixed::removeFromSelection()
updateUI();
}
void TaskFemConstraintFixed::setSelection(QListWidgetItem* item){
std::string docName=ConstraintView->getObject()->getDocument()->getName();
std::string s = item->text().toStdString();
std::string delimiter = ":";
size_t pos = 0;
std::string objName;
std::string subName;
pos = s.find(delimiter);
objName = s.substr(0, pos);
s.erase(0, pos + delimiter.length());
subName=s;
Gui::Selection().clearSelection();
Gui::Selection().addSelection(docName.c_str(),objName.c_str(),subName.c_str(),0,0,0);
}
void TaskFemConstraintFixed::onReferenceDeleted() {
TaskFemConstraintFixed::removeFromSelection();
}