#include <GeomDataAPI_Point.h>
#include <GeomDataAPI_Point2D.h>
+#include <QMessageBox>
+
#include <string>
#include <set>
#include <sstream>
if (!aParameter.get())
return;
+ std::string aNotActivatedNames;
+ if (!ModelAPI_Tools::allDocumentsActivated(aNotActivatedNames)) {
+ QMessageBox::StandardButton aRes = QMessageBox::warning(0, QObject::tr("Warning"),
+ QObject::tr("Selected objects can be used in Part documents which are not loaded: \
+%1. Whould you like to continue?").arg(aNotActivatedNames.c_str()),
+ QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
+ if (aRes != QMessageBox::Yes) {
+ setParameterName(aResultParameter, aMessage->oldName());
+ return;
+ }
+ }
+
// try to update the parameter feature according the new name
setParameterName(aResultParameter, aMessage->newName());
// TODO(spo): replace with ModelAPI_Session::get()->validators()->validate(aParameter, ParametersPlugin_Parameter::VARIABLE_ID())