myFeatures.clear();
}
- boost::shared_ptr<ModelAPI_Feature> PartSet_OperationEditLine::createFeature()
+void PartSet_OperationEditLine::blockSelection(bool isBlocked, const bool isRestoreSelection)
+{
+ if (isBlocked) {
+ emit setSelection(std::list<XGUI_ViewerPrs>());
+ emit stopSelection(myFeatures, true);
+ }
+ else {
+ emit stopSelection(myFeatures, false);
+ if (isRestoreSelection)
+ emit setSelection(myFeatures);
+ }
+}
+
+ boost::shared_ptr<ModelAPI_Feature> PartSet_OperationEditLine::createFeature(const bool /*theFlushMessage*/)
{
// do nothing in order to do not create a new feature
return boost::shared_ptr<ModelAPI_Feature>();
/// Creates an operation new feature
/// Returns NULL feature. This is an operation of edition, not creation.
+ /// \param theFlushMessage the flag whether the create message should be flushed
/// \returns the created feature
- virtual boost::shared_ptr<ModelAPI_Feature> createFeature();
+ virtual boost::shared_ptr<ModelAPI_Feature> createFeature(const bool theFlushMessage = true);
protected:
+ /// Emits a signal about the selection blocking. Emits a signal to change the selection.
+ /// If the block is true, the signal clear selection, otherwise if restore selection flag allows,
+ /// the internal operation features are to be selected
+ /// \param isBlocked the state whether the operation is blocked or unblocked
+ /// \param isRestoreSelection the state whether the selected objects should be reselected
+ void blockSelection(bool isBlocked, const bool isRestoreSelection = true);
+
/// \brief Save the point to the line.
/// \param theFeature the source feature
/// \param theDeltaX the delta for X coordinate is moved