Salome HOME
projects
/
modules
/
shaper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ac27f1
)
Fixes for porting to OCCT 7.5.0
author
mpv
<mpv@opencascade.com>
Thu, 28 Jan 2021 12:47:29 +0000
(15:47 +0300)
committer
mpv
<mpv@opencascade.com>
Thu, 28 Jan 2021 12:47:29 +0000
(15:47 +0300)
src/Model/Model_BodyBuilder.cpp
patch
|
blob
|
history
src/Model/Model_Document.cpp
patch
|
blob
|
history
src/Model/Model_Document.h
patch
|
blob
|
history
src/Model/Model_Objects.h
patch
|
blob
|
history
diff --git
a/src/Model/Model_BodyBuilder.cpp
b/src/Model/Model_BodyBuilder.cpp
index 17e0ceddf0e8872d8f08ffd3e1c1f59ae25da272..7c85821a1f21e8c72953d34a4321ba2e66daad4d 100644
(file)
--- a/
src/Model/Model_BodyBuilder.cpp
+++ b/
src/Model/Model_BodyBuilder.cpp
@@
-132,7
+132,7
@@
static bool isShapeInTree(const TDF_Label& theAccess1, const TDF_Label& theAcces
if (aResult) { //check evolution and a label of this shape
for(TNaming_SameShapeIterator aShapes(theShape, theAccess1); aShapes.More(); aShapes.Next())
{
if (aResult) { //check evolution and a label of this shape
for(TNaming_SameShapeIterator aShapes(theShape, theAccess1); aShapes.More(); aShapes.Next())
{
-
static
Handle(TNaming_NamedShape) aNS;
+ Handle(TNaming_NamedShape) aNS;
if (aShapes.Label().FindAttribute(TNaming_NamedShape::GetID(), aNS)) {
if (aNS->Evolution() != TNaming_SELECTED) {
theOriginalLabel = aNS->Label();
if (aShapes.Label().FindAttribute(TNaming_NamedShape::GetID(), aNS)) {
if (aNS->Evolution() != TNaming_SELECTED) {
theOriginalLabel = aNS->Label();
diff --git
a/src/Model/Model_Document.cpp
b/src/Model/Model_Document.cpp
index 5b68969e887510ec3353e12cbb8d1322aa3d72bc..8fec2926d90a8ddc97e45aa0958d33772b171a12 100644
(file)
--- a/
src/Model/Model_Document.cpp
+++ b/
src/Model/Model_Document.cpp
@@
-132,6
+132,15
@@
Model_Document::Model_Document(const int theID, const std::string theKind)
myDoc->CommitCommand();
}
myDoc->CommitCommand();
}
+Model_Document::~Model_Document()
+{
+ if (!myDoc.IsNull())
+ {
+ myDoc->ClearUndos();
+ myDoc->ClearRedos();
+ }
+}
+
void Model_Document::setThis(DocumentPtr theDoc)
{
myObjs->setOwner(theDoc);
void Model_Document::setThis(DocumentPtr theDoc)
{
myObjs->setOwner(theDoc);
@@
-331,6
+340,8
@@
bool Model_Document::load(const char* theDirName, const char* theFileName, Docum
aSession->setCheckTransactions(false);
if (myObjs)
delete myObjs;
aSession->setCheckTransactions(false);
if (myObjs)
delete myObjs;
+ anOldDoc->ClearRedos();
+ anOldDoc->ClearUndos();
anOldDoc.Nullify();
myObjs = new Model_Objects(myDoc->Main()); // synchronization is inside
myObjs->setOwner(theThis);
anOldDoc.Nullify();
myObjs = new Model_Objects(myDoc->Main()); // synchronization is inside
myObjs->setOwner(theThis);
diff --git
a/src/Model/Model_Document.h
b/src/Model/Model_Document.h
index 217e77eeb10df953c55b501aa07e8a4fc82314fe..5cda6ef82dba6528348711e8ea573ba6c19f479b 100644
(file)
--- a/
src/Model/Model_Document.h
+++ b/
src/Model/Model_Document.h
@@
-325,6
+325,9
@@
class Model_Document : public ModelAPI_Document
MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> nextFeature(
std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theReverse = false) const;
MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> nextFeature(
std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theReverse = false) const;
+ //! Erases the document structure.
+ ~Model_Document();
+
protected:
//! Returns (creates if needed) the general label
TDF_Label generalLabel() const;
protected:
//! Returns (creates if needed) the general label
TDF_Label generalLabel() const;
diff --git
a/src/Model/Model_Objects.h
b/src/Model/Model_Objects.h
index 3ae6c713a352aa6915b02e7aec17d01e860e5e9e..09b0e208135f56de7dda94cef09744eec3837607 100644
(file)
--- a/
src/Model/Model_Objects.h
+++ b/
src/Model/Model_Objects.h
@@
-27,7
+27,6
@@
#include <ModelAPI_Result.h>
#include <ModelAPI_ResultParameter.h>
#include <ModelAPI_Result.h>
#include <ModelAPI_ResultParameter.h>
-#include <TDocStd_Document.hxx>
#include <NCollection_DataMap.hxx>
#include <TDF_Label.hxx>
#include <TDF_LabelList.hxx>
#include <NCollection_DataMap.hxx>
#include <TDF_Label.hxx>
#include <TDF_LabelList.hxx>