#include <GeomAPI_Shape.h>
#include <GeomAPI_Wire.h>
#include <GeomAlgoAPI_SketchBuilder.h>
+#include <Events_Error.h>
#include <TNaming_Selector.hxx>
#include <TNaming_NamedShape.hxx>
aContext = aBody->shape()->impl<TopoDS_Shape>();
else {
ResultConstructionPtr aConstr = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(myRef.value());
- if (aConstr)
+ if (aConstr) {
aContext = aConstr->shape()->impl<TopoDS_Shape>();
- else
- throw std::invalid_argument("a result with shape is expected");
+ } else {
+ Events_Error::send("A result with shape is expected");
+ return;
+ }
}
aSel.Select(aNewShape, aContext);
}
#include <boost/smart_ptr/shared_ptr.hpp>
#include <list>
-#include <stdexcept>
-#include <xstring>
+#include <string>
typedef QMap<QString, TopAbs_ShapeEnum> ShapeTypes;
static ShapeTypes MyShapeTypes;
#include <V3d_View.hxx>
+#include <QMouseEvent>
#ifdef _DEBUG
#include <QDebug>
#endif
-#include <QMouseEvent>
-
-using namespace std;
+//using namespace std;
PartSet_OperationFeatureEditMulti::PartSet_OperationFeatureEditMulti(const QString& theId,
QObject* theParent,
//} else
myFeatures = theSelected;
// add highlighted elements if they are not selected
- std::list<ModuleBase_ViewerPrs>::const_iterator anIt;
- for (anIt = theHighlighted.cbegin(); anIt != theHighlighted.cend(); ++anIt) {
+ std::list<ModuleBase_ViewerPrs>::const_iterator anIt = theHighlighted.cbegin();
+ for ( ; anIt != theHighlighted.cend(); ++anIt) {
if (!isContains(myFeatures, (*anIt)))
myFeatures.push_back(*anIt);
}
// Remove current feature if it is in the list (it will be moved as main feature)
- FeaturePtr aFea = feature();
- for (anIt = myFeatures.cbegin(); anIt != myFeatures.cend(); ++anIt) {
- FeaturePtr aF = ModelAPI_Feature::feature((*anIt).object());
- if (ModelAPI_Feature::feature((*anIt).object()) == feature()) {
- myFeatures.erase(anIt);
+ std::list<ModuleBase_ViewerPrs>::iterator anEraseIt = myFeatures.begin();
+ for ( ; anEraseIt != myFeatures.end(); ++anEraseIt) {
+ if (ModelAPI_Feature::feature((*anEraseIt).object()) == feature()) {
+ myFeatures.erase(anEraseIt);
break;
}
}
#include <PartSet_OperationSketchBase.h>
#include <QObject>
+#include <list>
+
class QMouseEvent;
/*!
void XGUI_PreferencesDlg::onDefault()
{
// reset main resources
- QtxResourceMgr::WorkingMode aPrev = myPreferences->resourceMgr()->setWorkingMode
- (QtxResourceMgr::IgnoreUserValues);
+#ifdef WIN32
+ QtxResourceMgr::WorkingMode aPrev =
+ myPreferences->resourceMgr()->setWorkingMode(QtxResourceMgr::IgnoreUserValues);
myPreferences->retrieve();
myPreferences->resourceMgr()->setWorkingMode(aPrev);
-
+#endif
// reset plugin's resources
XGUI_Preferences::resetConfig();
XGUI_Preferences::updateResourcesByConfig();