X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Update.h;h=9ca9045450b8b16ae19f63833e4b8038ee925017;hb=8ca1067287eaaad921a6e08e7d10b875778f8457;hp=9e37eddd23383e2604fbcceda273f4bf25642920;hpb=a3f4857aa3c3485da49092b189aefc892529d00e;p=modules%2Fshaper.git diff --git a/src/Model/Model_Update.h b/src/Model/Model_Update.h index 9e37eddd2..9ca904545 100644 --- a/src/Model/Model_Update.h +++ b/src/Model/Model_Update.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: Model_Update.hxx -// Created: 25 Jun 2014 -// Author: Mikhail PONIKAROV +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef Model_Update_H_ #define Model_Update_H_ @@ -30,7 +44,8 @@ class Model_Update : public Events_Listener std::map, std::set > > myModified; /// Features which arguments were modified by not-persistent changes. - /// So, these referencing arguments must be updated due to these features info also before execution). + /// So, these referencing arguments must be updated + /// due to these features info also before execution). std::map, std::set > > myNotPersistentRefs; /// features that must be additionally processed after execution of finish operation @@ -41,12 +56,16 @@ class Model_Update : public Events_Listener bool myIsFinish; /// try if processing is currently performed bool myIsProcessed; - /// set that contains features that must be executed only on finish of the operation - std::set > myProcessOnFinish; + /// map that contains features that must be executed only on finish of the operation + /// the value in map is the set of reasons + std::map, std::set > > + myProcessOnFinish; /// to avoid infinitive cycling: feature -> count of the processing periods during this update std::map, int > myProcessed; - /// if preview in hte property panel is blocked and any update is postponed until the end of operation + /// if preview in the property panel is blocked any update is postponed until end of operation bool myIsPreviewBlocked; + /// disables any update if it is true, even on start/finish operation, undo, etc. + bool myUpdateBlocked; public: /// Is called only once, on startup of the application @@ -72,8 +91,8 @@ protected: void updateArguments(std::shared_ptr theFeature); /// Sends the redisplay events for feature and results, updates the updated status - void redisplayWithResults(std::shared_ptr theFeature, - const ModelAPI_ExecState theState); + void redisplayWithResults(std::shared_ptr theFeature, + const ModelAPI_ExecState theState, bool theUpdateState = true); /// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way //! \param theFlushRedisplay a boolean value if the redisplay signal should be flushed @@ -86,9 +105,15 @@ protected: /// Updates the properties of object because of stability state changes void updateStability(void* theSender); - /// Returns true if theFeature modification was caused by theReason (may be feature of result of this feature) + /// Returns true if theFeature modification was caused by theReason + /// (may be feature of result of this feature) bool isReason( std::shared_ptr& theFeature, std::shared_ptr theReason); + + /// Updates a selection attributes for the features that possible were affected by creation + /// or reorder of features upper in the history line (issue #1757) + void updateSelection(const std::set >& theObjects); + }; #endif