bugfix: Tools are deactivated on canvas switch.

This commit is contained in:
Maciej Suminski 2014-12-10 00:50:31 +01:00
parent 1df31338a3
commit 7e249c758b
1 changed files with 3 additions and 0 deletions

View File

@ -411,6 +411,9 @@ TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const
void TOOL_MANAGER::ResetTools( TOOL_BASE::RESET_REASON aReason )
{
TOOL_EVENT evt( TC_COMMAND, TA_ACTIVATE, "" ); // deactivate the active tool
ProcessEvent( evt );
BOOST_FOREACH( TOOL_BASE* tool, m_toolState | boost::adaptors::map_keys )
tool->Reset( aReason );
}