- switch (theKey) {
- case Qt::Key_Escape: {
- bool toAbort = true;
- if (isModified()) {
- int anAnswer = QMessageBox::question(qApp->activeWindow(), tr("Cancel operation"),
- tr("Operation %1 will be cancelled. Continue?").arg(id()),
- QMessageBox::Yes, QMessageBox::No);
- toAbort = (anAnswer == QMessageBox::Yes);
- }
- if (toAbort)
- abort();
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theFeature);
+ if (aFeature) {
+ QStringList aNested = this->nestedFeatures();
+ if (!aNested.isEmpty()) {
+ if (!aNested.contains(QString(aFeature->getKind().c_str())))
+ return;