Sync the PNS model when its changed

This commit is contained in:
Maciej Suminski 2016-11-28 15:45:37 +01:00
parent 89a5f8ce69
commit 524dddaf70
3 changed files with 5 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public:
enum RESET_REASON enum RESET_REASON
{ {
RUN, ///< Tool is invoked after being inactive RUN, ///< Tool is invoked after being inactive
MODEL_RELOAD, ///< Model changes MODEL_RELOAD, ///< Model changes (required full reload)
GAL_SWITCH ///< Rendering engine changes GAL_SWITCH ///< Rendering engine changes
}; };

View File

@ -106,6 +106,9 @@ enum TOOL_ACTIONS
// Tool activation event. // Tool activation event.
TA_ACTIVATE = 0x100000, TA_ACTIVATE = 0x100000,
// Model has changed (partial update).
TA_MODEL_CHANGE = 0x200000,
TA_ANY = 0xffffffff TA_ANY = 0xffffffff
}; };

View File

@ -693,7 +693,7 @@ int ROUTER_TOOL::mainLoop( PNS::ROUTER_MODE aMode )
{ {
m_router->ClearWorld(); m_router->ClearWorld();
} }
else if( evt->Action() == TA_UNDO_REDO_POST ) else if( evt->Action() == TA_UNDO_REDO_POST || evt->Action() == TA_MODEL_CHANGE )
{ {
m_router->SyncWorld(); m_router->SyncWorld();
} }