Commit aad359fc authored by Maciej Suminski's avatar Maciej Suminski

Fixed Mac OS build.

parent af1317f6
...@@ -145,7 +145,7 @@ struct TOOL_MANAGER::TOOL_STATE ...@@ -145,7 +145,7 @@ struct TOOL_MANAGER::TOOL_STATE
*/ */
void Push() void Push()
{ {
stateStack.push( *this ); stateStack.push( new TOOL_STATE( *this ) );
clear(); clear();
} }
...@@ -162,7 +162,8 @@ struct TOOL_MANAGER::TOOL_STATE ...@@ -162,7 +162,8 @@ struct TOOL_MANAGER::TOOL_STATE
if( !stateStack.empty() ) if( !stateStack.empty() )
{ {
*this = stateStack.top(); *this = *stateStack.top();
delete stateStack.top();
stateStack.pop(); stateStack.pop();
return true; return true;
...@@ -177,7 +178,7 @@ struct TOOL_MANAGER::TOOL_STATE ...@@ -177,7 +178,7 @@ struct TOOL_MANAGER::TOOL_STATE
private: private:
///> Stack preserving previous states of a TOOL. ///> Stack preserving previous states of a TOOL.
std::stack<TOOL_STATE> stateStack; std::stack<TOOL_STATE*> stateStack;
///> Restores the initial state. ///> Restores the initial state.
void clear() void clear()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment