1. Remove operation constraint class.
2. Edit constraint lenght. The lenght is moved. Selected(not highlighted)
else if (PartSet_OperationCreateConstraint::canProcessKind(theCmdId))
anOperation = new PartSet_OperationCreateConstraint(theCmdId.c_str(), this, aSketch);
else if (theCmdId == PartSet_OperationEditConstraint::Type())
- anOperation = new PartSet_OperationEditConstraint(theCmdId.c_str(), this, aSketch);
+ anOperation = new PartSet_OperationEditConstraint(theCmdId.c_str(), theFeatureKind, this, aSketch);
}
if (!anOperation) {
using namespace std;
PartSet_OperationEditConstraint::PartSet_OperationEditConstraint(const QString& theId,
+ const std::string& theFeatureKind,
QObject* theParent,
FeaturePtr theFeature)
-: PartSet_OperationSketchBase(theId, theParent), mySketch(theFeature), myIsBlockedSelection(false)
+: PartSet_OperationSketchBase(theId, theParent), myIsBlockedSelection(false)
{
- std::string aKind = theId.toStdString();
- myFeaturePrs = PartSet_Tools::createFeaturePrs(aKind, theFeature);
+ myFeaturePrs = PartSet_Tools::createFeaturePrs(theFeatureKind, theFeature);
// changed
myEditor = new PartSet_EditLine(0);
const std::list<XGUI_ViewerPrs>& theHighlighted)
{
setFeature(theFeature);
+ myFeaturePrs->init(theFeature);
+
/*
if (!theHighlighted.empty()) {
// if there is highlighted object, we check whether it is in the list of selected objects
FeaturePtr PartSet_OperationEditConstraint::sketch() const
{
- return mySketch;
+ return myFeaturePrs->sketch();
}
void PartSet_OperationEditConstraint::mousePressed(QMouseEvent* theEvent, Handle(V3d_View) theView,
public:
/// Constructor
/// \param theId the feature identifier
+ /// \param theFeatureId the feature identifier
/// \param theParent the operation parent
/// \param theFeature the parent feature
- PartSet_OperationEditConstraint(const QString& theId, QObject* theParent,
- FeaturePtr theFeature);
+ PartSet_OperationEditConstraint(const QString& theId, const std::string& theFeatureKind,
+ QObject* theParent, FeaturePtr theFeature);
/// Destructor
virtual ~PartSet_OperationEditConstraint();
private:
PartSet_EditLine* myEditor; ///< the constraint value editor
boost::shared_ptr<PartSet_FeaturePrs> myFeaturePrs; ///< the feature presentation
- FeaturePtr mySketch; ///< the sketch feature
//std::list<XGUI_ViewerPrs> myFeatures; ///< the features to apply the edit operation
Point myCurPoint; ///< the current 3D point clicked or moved
bool myIsBlockedSelection; ///< the state of the last state of selection blocked signal