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
f5325f8d
Commit
f5325f8d
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed a redundant pointer to EDA_EDIT_FRAME.
parent
e46c5cb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
tool_dispatcher.cpp
common/tool/tool_dispatcher.cpp
+5
-5
tool_dispatcher.h
include/tool/tool_dispatcher.h
+1
-4
pcb_tools.cpp
pcbnew/tools/pcb_tools.cpp
+1
-1
No files found.
common/tool/tool_dispatcher.cpp
View file @
f5325f8d
...
...
@@ -88,8 +88,8 @@ struct TOOL_DISPATCHER::BUTTON_STATE
};
TOOL_DISPATCHER
::
TOOL_DISPATCHER
(
TOOL_MANAGER
*
aToolMgr
,
PCB_BASE_FRAME
*
aEditFrame
)
:
m_toolMgr
(
aToolMgr
)
,
m_editFrame
(
aEditFrame
)
TOOL_DISPATCHER
::
TOOL_DISPATCHER
(
TOOL_MANAGER
*
aToolMgr
)
:
m_toolMgr
(
aToolMgr
)
{
m_buttons
.
push_back
(
new
BUTTON_STATE
(
BUT_LEFT
,
wxEVT_LEFT_DOWN
,
wxEVT_LEFT_UP
,
wxEVT_LEFT_DCLICK
)
);
...
...
@@ -118,7 +118,7 @@ void TOOL_DISPATCHER::ResetState()
KIGFX
::
VIEW
*
TOOL_DISPATCHER
::
getView
()
{
return
m_editFrame
->
GetGalCanvas
()
->
GetView
();
return
static_cast
<
PCB_BASE_FRAME
*>
(
m_toolMgr
->
GetEditFrame
()
)
->
GetGalCanvas
()
->
GetView
();
}
...
...
@@ -229,7 +229,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
{
motion
=
true
;
m_lastMousePos
=
pos
;
m_editFrame
->
UpdateStatusBar
();
static_cast
<
PCB_BASE_FRAME
*>
(
m_toolMgr
->
GetEditFrame
()
)
->
UpdateStatusBar
();
}
for
(
unsigned
int
i
=
0
;
i
<
m_buttons
.
size
();
i
++
)
...
...
@@ -245,7 +245,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
// TODO That's a big ugly workaround, somehow DRAWPANEL_GAL loses focus
// after second LMB click and currently I have no means to do better debugging
if
(
type
==
wxEVT_LEFT_UP
)
m_editFrame
->
GetGalCanvas
()
->
SetFocus
();
static_cast
<
PCB_BASE_FRAME
*>
(
m_toolMgr
->
GetEditFrame
()
)
->
GetGalCanvas
()
->
SetFocus
();
#endif
/* __APPLE__ */
}
...
...
include/tool/tool_dispatcher.h
View file @
f5325f8d
...
...
@@ -56,7 +56,7 @@ public:
* @param aToolMgr: tool manager instance the events will be sent to
* @param aEditFrame: the frame wx events come from
*/
TOOL_DISPATCHER
(
TOOL_MANAGER
*
aToolMgr
,
PCB_BASE_FRAME
*
aEditFrame
);
TOOL_DISPATCHER
(
TOOL_MANAGER
*
aToolMgr
);
virtual
~
TOOL_DISPATCHER
();
/**
...
...
@@ -128,9 +128,6 @@ private:
///> Instance of tool manager that cooperates with the dispatcher.
TOOL_MANAGER
*
m_toolMgr
;
///> Instance of wxFrame that is the source of UI events.
PCB_BASE_FRAME
*
m_editFrame
;
};
#endif
pcbnew/tools/pcb_tools.cpp
View file @
f5325f8d
...
...
@@ -47,7 +47,7 @@ void PCB_EDIT_FRAME::setupTools()
{
// Create the manager and dispatcher & route draw panel events to the dispatcher
m_toolManager
=
new
TOOL_MANAGER
;
m_toolDispatcher
=
new
TOOL_DISPATCHER
(
m_toolManager
,
this
);
m_toolDispatcher
=
new
TOOL_DISPATCHER
(
m_toolManager
);
GetGalCanvas
()
->
SetEventDispatcher
(
m_toolDispatcher
);
// Connect handlers to toolbar buttons
...
...
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