From 7e4eba9eed1097bdd65ce641dbeee01700270bf7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Sep 2013 16:25:57 +0200 Subject: [PATCH] Some comments. --- common/gal/opengl/opengl_compositor.cpp | 3 ++- common/tool/tool_manager.cpp | 5 +++-- include/tool/tool_manager.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 3485131aa7..0a212af554 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -167,8 +167,9 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() } } - ClearBuffer(); + + // Return to direct rendering (we were asked only to create a buffer, not switch to one) glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); m_currentFbo = DIRECT_RENDERING; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 1601b7aece..03250f8fff 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -207,9 +207,9 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->wakeupEvent = aEvent; st->pendingWait = false; st->waitEvents.clear(); - st->cofunc->Resume(); - if( !st->cofunc->Running() ) + if( !st->cofunc->Resume() ) { + // The couroutine has finished finishTool( st ); } @@ -258,6 +258,7 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { wxASSERT( m_activeTools.front() == aState->theTool->GetId() ); + // Deactivate the most recent tool and remove it from the active tools queue aState->idle = true; m_activeTools.erase( m_activeTools.begin() ); diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 765e5cd606..f0830263de 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -154,7 +154,7 @@ public: CONTEXT_MENU_TRIGGER aTrigger ); /** - * Allows a tool pass the already handled event to be passed to the next tool on the stack. + * Allows a tool to pass the already handled event to the next tool on the stack. */ void PassEvent() {