[PD] enable to de/selecet several entities at once
see https://forum.freecadweb.org/viewtopic.php?f=19&t=43383
This commit is contained in:
@@ -106,8 +106,8 @@ void TaskChamferParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
ui->listWidgetReferences->addItem(QString::fromStdString(msg.pSubName));
|
||||
else
|
||||
removeItemFromListWidget(ui->listWidgetReferences, msg.pSubName);
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
// highlight existing references for possible further selections
|
||||
DressUpView->highlightReferences(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,8 +128,8 @@ void TaskDraftParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
ui->listWidgetReferences->addItem(QString::fromStdString(msg.pSubName));
|
||||
else
|
||||
removeItemFromListWidget(ui->listWidgetReferences, msg.pSubName);
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
// highlight existing references for possible further selections
|
||||
DressUpView->highlightReferences(true);
|
||||
} else if (selectionMode == plane) {
|
||||
PartDesign::Draft* pcDraft = static_cast<PartDesign::Draft*>(DressUpView->getObject());
|
||||
std::vector<std::string> planes;
|
||||
@@ -142,8 +142,8 @@ void TaskDraftParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
ui->linePlane->setText(getRefStr(selObj, planes));
|
||||
|
||||
pcDraft->getDocument()->recomputeFeature(pcDraft);
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
// highlight existing references for possible further selections
|
||||
DressUpView->highlightReferences(true);
|
||||
} else if (selectionMode == line) {
|
||||
PartDesign::Draft* pcDraft = static_cast<PartDesign::Draft*>(DressUpView->getObject());
|
||||
std::vector<std::string> edges;
|
||||
@@ -156,8 +156,8 @@ void TaskDraftParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
ui->lineLine->setText(getRefStr(selObj, edges));
|
||||
|
||||
pcDraft->getDocument()->recomputeFeature(pcDraft);
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
// highlight existing references for possible further selections
|
||||
DressUpView->highlightReferences(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,11 @@ void TaskDressUpParameters::onButtonRefAdd(bool checked)
|
||||
Gui::Selection().clearSelection();
|
||||
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), allowEdges, allowFaces, false));
|
||||
DressUpView->highlightReferences(true);
|
||||
} else {
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
showObject();
|
||||
DressUpView->highlightReferences(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +149,12 @@ void TaskDressUpParameters::onButtonRefRemove(const bool checked)
|
||||
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), allowEdges, allowFaces, false));
|
||||
DressUpView->highlightReferences(true);
|
||||
}
|
||||
else {
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
showObject();
|
||||
DressUpView->highlightReferences(false);
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<std::string> TaskDressUpParameters::getReferences() const
|
||||
|
||||
@@ -106,8 +106,8 @@ void TaskFilletParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
ui->listWidgetReferences->addItem(QString::fromStdString(msg.pSubName));
|
||||
else
|
||||
removeItemFromListWidget(ui->listWidgetReferences, msg.pSubName);
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
// highlight existing references for possible further selections
|
||||
DressUpView->highlightReferences(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,8 +128,8 @@ void TaskThicknessParameters::onSelectionChanged(const Gui::SelectionChanges& ms
|
||||
ui->listWidgetReferences->addItem(QString::fromStdString(msg.pSubName));
|
||||
else
|
||||
removeItemFromListWidget(ui->listWidgetReferences, msg.pSubName);
|
||||
clearButtons(none);
|
||||
exitSelectionMode();
|
||||
// highlight existing references for possible further selections
|
||||
DressUpView->highlightReferences(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user