From: <hug...@li...> - 2011-03-02 17:40:25
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/4ef317be5962 changeset: 5079:4ef317be5962 user: tmodes date: Wed Mar 02 18:39:55 2011 +0100 description: Fixes crash in gray color picker [727449] diffstat: src/hugin1/hugin/GLPreviewFrame.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 54ebce159126 -r 4ef317be5962 src/hugin1/hugin/GLPreviewFrame.cpp --- a/src/hugin1/hugin/GLPreviewFrame.cpp Tue Mar 01 19:55:36 2011 +0100 +++ b/src/hugin1/hugin/GLPreviewFrame.cpp Wed Mar 02 18:39:55 2011 +0100 @@ -2001,7 +2001,11 @@ ); //now toggle button and deactivate tool XRCCTRL(*this,"preview_color_picker_toolbar",wxToolBar)->ToggleTool(XRCID("preview_color_picker_tool"),false); - preview_helper->DeactivateTool(color_picker_tool); + //direct deactivation of tool does not work because this function is called by the tool itself + //so we are send an event to deactivate the tool + wxCommandEvent e(wxEVT_COMMAND_TOOL_CLICKED, XRCID("preview_color_picker_tool")); + e.SetInt(0); + GetEventHandler()->AddPendingEvent(e); }; ImageToogleButtonEventHandler::ImageToogleButtonEventHandler( |