Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c7116e9d
Commit
c7116e9d
authored
Mar 21, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIxed too late deletion of TOOLs.
parent
87c9423f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
tool_manager.cpp
common/tool/tool_manager.cpp
+9
-1
tool_manager.h
include/tool/tool_manager.h
+5
-0
pcb_tools.cpp
pcbnew/tools/pcb_tools.cpp
+1
-0
No files found.
common/tool/tool_manager.cpp
View file @
c7116e9d
...
@@ -103,6 +103,14 @@ TOOL_MANAGER::TOOL_MANAGER() :
...
@@ -103,6 +103,14 @@ TOOL_MANAGER::TOOL_MANAGER() :
TOOL_MANAGER
::~
TOOL_MANAGER
()
TOOL_MANAGER
::~
TOOL_MANAGER
()
{
DeleteAll
();
delete
m_actionMgr
;
}
void
TOOL_MANAGER
::
DeleteAll
()
{
{
std
::
map
<
TOOL_BASE
*
,
TOOL_STATE
*>::
iterator
it
,
it_end
;
std
::
map
<
TOOL_BASE
*
,
TOOL_STATE
*>::
iterator
it
,
it_end
;
...
@@ -113,7 +121,7 @@ TOOL_MANAGER::~TOOL_MANAGER()
...
@@ -113,7 +121,7 @@ TOOL_MANAGER::~TOOL_MANAGER()
delete
it
->
first
;
// delete the tool itself
delete
it
->
first
;
// delete the tool itself
}
}
delete
m_actionMgr
;
m_toolState
.
clear
()
;
}
}
...
...
include/tool/tool_manager.h
View file @
c7116e9d
...
@@ -57,6 +57,11 @@ public:
...
@@ -57,6 +57,11 @@ public:
~
TOOL_MANAGER
();
~
TOOL_MANAGER
();
/**
* Deletes all the tools that were registered in the TOOL_MANAGER.
*/
void
DeleteAll
();
/**
/**
* Generates an unique ID from for a tool with given name.
* Generates an unique ID from for a tool with given name.
*/
*/
...
...
pcbnew/tools/pcb_tools.cpp
View file @
c7116e9d
...
@@ -68,6 +68,7 @@ void PCB_EDIT_FRAME::setupTools()
...
@@ -68,6 +68,7 @@ void PCB_EDIT_FRAME::setupTools()
void
PCB_EDIT_FRAME
::
destroyTools
()
void
PCB_EDIT_FRAME
::
destroyTools
()
{
{
m_toolManager
.
DeleteAll
();
delete
m_toolDispatcher
;
delete
m_toolDispatcher
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment