From: mpv Date: Thu, 13 Nov 2014 10:47:01 +0000 (+0300) Subject: Fix for crash on Debian Squeeze. It is quite tricky and crash is avoided if change... X-Git-Tag: V_0.5.1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dffc29bfc818854188e4e060aca3f077c70e74e0;p=modules%2Fshaper.git Fix for crash on Debian Squeeze. It is quite tricky and crash is avoided if change the order of execution of methods. --- diff --git a/src/Model/CMakeLists.txt b/src/Model/CMakeLists.txt index 753fd7817..3d7716827 100644 --- a/src/Model/CMakeLists.txt +++ b/src/Model/CMakeLists.txt @@ -67,7 +67,7 @@ SET(PROJECT_LIBRARIES ADD_DEFINITIONS(-DMODEL_EXPORTS ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}) -ADD_LIBRARY(Model SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}) +ADD_LIBRARY(Model MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}) TARGET_LINK_LIBRARIES(Model ${PROJECT_LIBRARIES}) INCLUDE_DIRECTORIES( diff --git a/src/Model/Model_Session.cpp b/src/Model/Model_Session.cpp index 2c9a5abad..2c624b8aa 100644 --- a/src/Model/Model_Session.cpp +++ b/src/Model/Model_Session.cpp @@ -101,6 +101,9 @@ FeaturePtr Model_Session::createFeature(string theFeatureID) if (this != myImpl) return myImpl->createFeature(theFeatureID); + // load all information about plugins, features and attributes + LoadPluginsInfo(); + if (myPlugins.find(theFeatureID) != myPlugins.end()) { std::pair& aPlugin = myPlugins[theFeatureID]; // plugin and doc kind if (!aPlugin.second.empty() && aPlugin.second != activeDocument()->kind()) { @@ -217,9 +220,6 @@ Model_Session::Model_Session() aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED), 0, true); aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED), 0, true); aLoop->registerListener(this, Events_Loop::eventByName(EVENT_VALIDATOR_LOADED)); - - // load all information about plugins, features and attributes - LoadPluginsInfo(); } void Model_Session::processEvent(const boost::shared_ptr& theMessage) diff --git a/src/SketchPlugin/Test/TestConstraintConcidence.py b/src/SketchPlugin/Test/TestConstraintConcidence.py index dedb420a5..35e9ac0c8 100644 --- a/src/SketchPlugin/Test/TestConstraintConcidence.py +++ b/src/SketchPlugin/Test/TestConstraintConcidence.py @@ -84,9 +84,9 @@ assert (aLineStartPoint.y() == 0) deltaX = deltaY = 40. # move line aSession.startOperation() -aLineStartPoint.setValue(aLineStartPoint.x() + deltaX, +anArcStartPoint.setValue(aLineStartPoint.x() + deltaX, aLineStartPoint.y() + deltaY) -aLineEndPoint.setValue(aLineEndPoint.x() + deltaX, +anArcEndPoint.setValue(aLineEndPoint.x() + deltaX, aLineEndPoint.y() + deltaY) aSession.finishOperation() # check that arc's points are moved also