From 6054e7be0abd6c765bd975d71a2169a180944383 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 16:01:46 +0200 Subject: [PATCH] Added a few comments. --- common/tool/tool_dispatcher.cpp | 3 +-- include/tool/tool_manager.h | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 89da297fa9..d87a7248fd 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -155,7 +155,6 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti } else isClick = true; - if( isClick ) { @@ -256,7 +255,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) } -void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) +void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent ) { bool activateTool = false; std::string toolName; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index f0830263de..cfafb609c0 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -71,6 +71,8 @@ public: * Function InvokeTool() * Calls a tool by sending a tool activation event to tool of given ID or name. * An user-defined parameter object can be also passed + * + * @return True if the requested tool was invoked successfully. */ bool InvokeTool( TOOL_ID aToolId ); bool InvokeTool( const std::string& aName ); @@ -81,6 +83,8 @@ public: /** * Function FindTool() * Searches for a tool with given name or ID + * + * @return Pointer to the request tool of NULL in case of failure. */ TOOL_BASE* FindTool( int aId ) const; TOOL_BASE* FindTool( const std::string& aName ) const; @@ -100,7 +104,7 @@ public: /** * Sets the work environment (model, view, view controls and the parent window). * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) - * when the board is set up + * when the board is set up. */ void SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame );