- QString aText;
- if (canReplaceParameters) {
- aText = QString(tr("Selected parameters are used in the following features: %1.\nThese features will be deleted.\n%2Or parameters could be replaced by their values.\nWould you like to continue?"))
- .arg(aDirectNames).arg(aIndirectNames.isEmpty() ? QString() : QString(tr("(Also these features will be deleted: %1)\n")).arg(aIndirectNames));
+ if (aCanReplaceParameters && aResultGroupName != ModelAPI_ResultParameter::group())
+ aCanReplaceParameters = false;
+ }
+ QString aPartNames = aPartFeatureNames.join(", ");
+
+ QMessageBox aMessageBox(theParent);
+ aMessageBox.setWindowTitle(tr("Delete features"));
+ aMessageBox.setIcon(QMessageBox::Warning);
+ aMessageBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
+ aMessageBox.setDefaultButton(QMessageBox::No);
+
+ QString aText;
+ if (!aDirectNames.isEmpty() || !aIndirectNames.isEmpty()) {
+ if (aCanReplaceParameters) {
+ aText = QString(tr("Selected parameters are used in the following features: %1.\nThese features will be deleted.\nOr parameters could be replaced by their values.\n")
+ .arg(aDirectNames));
+ if (!aIndirectNames.isEmpty())
+ aText += QString(tr("(Also these features will be deleted: %1)\n")).arg(aIndirectNames);