Fixed Mac OS build.

This commit is contained in:
Maciej Suminski 2014-07-20 20:58:33 +02:00
parent af1317f6b4
commit aad359fcf9
1 changed files with 4 additions and 3 deletions

View File

@ -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
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
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()