From 9fca82c23f8518af6619f8d779b29abe13ea067f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Sep 2014 14:09:20 +0200 Subject: [PATCH] pcbnew: bugfix for crashes when canvas is switched while dragging items (GAL). --- pcbnew/tools/edit_tool.cpp | 6 ++++++ pcbnew/tools/edit_tool.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index db852f6bfc..7b12ee4b96 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -48,6 +48,12 @@ EDIT_TOOL::EDIT_TOOL() : } +void EDIT_TOOL::Reset( RESET_REASON aReason ) +{ + m_dragging = false; +} + + bool EDIT_TOOL::Init() { // Find the selection tool, so they can cooperate diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 76b161ae01..a3386b3823 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -50,7 +50,7 @@ public: EDIT_TOOL(); /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset( RESET_REASON aReason ) {}; + void Reset( RESET_REASON aReason ); /// @copydoc TOOL_INTERACTIVE::Init() bool Init();