From: nds Date: Thu, 22 May 2014 14:32:07 +0000 (+0400) Subject: Merge branch 'master' of newgeom:newgeom X-Git-Tag: V_0.2~26^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad247cf594a7a560b656c70c96e1b1a360b8c1c3;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom Conflicts: src/PartSet/PartSet_OperationEditLine.cpp --- ad247cf594a7a560b656c70c96e1b1a360b8c1c3 diff --cc src/PartSet/PartSet_OperationEditLine.cpp index 561ae86e3,4cfbc3e9a..d630bb2c3 --- a/src/PartSet/PartSet_OperationEditLine.cpp +++ b/src/PartSet/PartSet_OperationEditLine.cpp @@@ -177,20 -151,7 +179,20 @@@ void PartSet_OperationEditLine::stopOpe myFeatures.clear(); } +void PartSet_OperationEditLine::blockSelection(bool isBlocked, const bool isRestoreSelection) +{ + if (isBlocked) { + emit setSelection(std::list()); + emit stopSelection(myFeatures, true); + } + else { + emit stopSelection(myFeatures, false); + if (isRestoreSelection) + emit setSelection(myFeatures); + } +} + - boost::shared_ptr PartSet_OperationEditLine::createFeature() + boost::shared_ptr PartSet_OperationEditLine::createFeature(const bool /*theFlushMessage*/) { // do nothing in order to do not create a new feature return boost::shared_ptr(); diff --cc src/PartSet/PartSet_OperationEditLine.h index 8f0b62361,d053067b8..219d23b2c --- a/src/PartSet/PartSet_OperationEditLine.h +++ b/src/PartSet/PartSet_OperationEditLine.h @@@ -114,17 -106,11 +114,18 @@@ protected /// 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 createFeature(); + virtual boost::shared_ptr 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