bool isNestedClosed = !myDoc->HasOpenCommand() && !myNestedNum.empty();
static std::shared_ptr<Model_Session> aSession =
std::static_pointer_cast<Model_Session>(Model_Session::get());
+
+ // open transaction if nested is closed to fit inside all synchronizeBackRefs and flushed consequences
+ if (isNestedClosed) {
+ myDoc->OpenCommand();
+ }
// do it before flashes to enable and recompute nesting features correctly
if (myNestedNum.empty() || (isNestedClosed && myNestedNum.size() == 1)) {
// if all nested operations are closed, make current the higher level objects (to perform
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+
+ if (isNestedClosed) {
+ if (myDoc->CommitCommand())
+ myTransactions.rbegin()->myOCAFNum++;
+ }
+
// this must be here just after everything is finished but before real transaction stop
// to avoid messages about modifications outside of the transaction
// and to rebuild everything after all updates and creates
#include <TDataStd_RealArray.hxx>
#include <TDataStd_ExtStringArray.hxx>
+#include <limits>
static Standard_GUID kInvalidGUID("caee5ce4-34b1-4b29-abcb-685287d18096");
{
if (myIsInitialized)
return myReal->Get();
- return -1.; // error
+ return std::numeric_limits<double>::max(); // error
}
void Model_ExpressionDouble::setInvalid(const bool theFlag)
{
if (myIsInitialized)
return myInteger->Get();
- return -1; // error
+ return std::numeric_limits<int>::max(); // error
}
void Model_ExpressionInteger::setInvalid(const bool theFlag)