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
d41bc31c
Commit
d41bc31c
authored
May 03, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug #1447905 (very minor bug, in fact). Fix a few minor coding style issues.
Fix 2 coverity warnings.
parent
2047d873
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
27 deletions
+41
-27
build_version.cpp
common/build_version.cpp
+1
-1
draw_frame.cpp
common/draw_frame.cpp
+31
-21
draw_panel.cpp
common/draw_panel.cpp
+4
-2
block.cpp
eeschema/block.cpp
+1
-1
hotkeys.cpp
eeschema/hotkeys.cpp
+1
-1
pcbnew_control.cpp
pcbnew/tools/pcbnew_control.cpp
+1
-1
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+2
-0
No files found.
common/build_version.cpp
View file @
d41bc31c
...
...
@@ -30,7 +30,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
# define KICAD_BUILD_VERSION "(after 2015-
apr-15
BZR unknown)"
# define KICAD_BUILD_VERSION "(after 2015-
may-01
BZR unknown)"
#endif
/**
...
...
common/draw_frame.cpp
View file @
d41bc31c
...
...
@@ -716,17 +716,17 @@ wxString EDA_DRAW_FRAME::LengthDoubleToString( double aValue, bool aConvertToMil
bool
EDA_DRAW_FRAME
::
HandleBlockBegin
(
wxDC
*
aDC
,
int
aKey
,
const
wxPoint
&
aPosition
)
{
BLOCK_SELECTOR
*
B
lock
=
&
GetScreen
()
->
m_BlockLocate
;
BLOCK_SELECTOR
*
b
lock
=
&
GetScreen
()
->
m_BlockLocate
;
if
(
(
Block
->
GetCommand
()
!=
BLOCK_IDLE
)
||
(
B
lock
->
GetState
()
!=
STATE_NO_BLOCK
)
)
if
(
(
block
->
GetCommand
()
!=
BLOCK_IDLE
)
||
(
b
lock
->
GetState
()
!=
STATE_NO_BLOCK
)
)
return
false
;
B
lock
->
SetCommand
(
(
BLOCK_COMMAND_T
)
BlockCommand
(
aKey
)
);
b
lock
->
SetCommand
(
(
BLOCK_COMMAND_T
)
BlockCommand
(
aKey
)
);
if
(
B
lock
->
GetCommand
()
==
0
)
if
(
b
lock
->
GetCommand
()
==
0
)
return
false
;
switch
(
B
lock
->
GetCommand
()
)
switch
(
b
lock
->
GetCommand
()
)
{
case
BLOCK_IDLE
:
break
;
...
...
@@ -744,17 +744,17 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
case
BLOCK_MIRROR_X
:
case
BLOCK_MIRROR_Y
:
// mirror
case
BLOCK_PRESELECT_MOVE
:
// Move with preselection list
B
lock
->
InitData
(
m_canvas
,
aPosition
);
b
lock
->
InitData
(
m_canvas
,
aPosition
);
break
;
case
BLOCK_PASTE
:
B
lock
->
InitData
(
m_canvas
,
aPosition
);
B
lock
->
SetLastCursorPosition
(
wxPoint
(
0
,
0
)
);
b
lock
->
InitData
(
m_canvas
,
aPosition
);
b
lock
->
SetLastCursorPosition
(
wxPoint
(
0
,
0
)
);
InitBlockPasteInfos
();
if
(
B
lock
->
GetCount
()
==
0
)
// No data to paste
if
(
b
lock
->
GetCount
()
==
0
)
// No data to paste
{
DisplayError
(
this
,
wxT
(
"No
B
lock to paste"
),
20
);
DisplayError
(
this
,
wxT
(
"No
b
lock to paste"
),
20
);
GetScreen
()
->
m_BlockLocate
.
SetCommand
(
BLOCK_IDLE
);
m_canvas
->
SetMouseCaptureCallback
(
NULL
);
return
true
;
...
...
@@ -762,13 +762,13 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
if
(
!
m_canvas
->
IsMouseCaptured
()
)
{
B
lock
->
ClearItemsList
();
b
lock
->
ClearItemsList
();
DisplayError
(
this
,
wxT
(
"EDA_DRAW_FRAME::HandleBlockBegin() Err: m_mouseCaptureCallback NULL"
)
);
return
true
;
}
B
lock
->
SetState
(
STATE_BLOCK_MOVE
);
b
lock
->
SetState
(
STATE_BLOCK_MOVE
);
m_canvas
->
CallMouseCapture
(
aDC
,
aPosition
,
false
);
break
;
...
...
@@ -776,13 +776,13 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
{
wxString
msg
;
msg
<<
wxT
(
"EDA_DRAW_FRAME::HandleBlockBegin() error: Unknown command "
)
<<
B
lock
->
GetCommand
();
b
lock
->
GetCommand
();
DisplayError
(
this
,
msg
);
}
break
;
}
B
lock
->
SetMessageBlock
(
this
);
b
lock
->
SetMessageBlock
(
this
);
return
true
;
}
...
...
@@ -1162,13 +1162,23 @@ void EDA_DRAW_FRAME::GeneralControlKeyMovement( int aHotKey, wxPoint *aPos,
switch
(
aHotKey
)
{
// All these keys have almost the same treatment
case
GR_KB_CTRL
|
WXK_NUMPAD8
:
case
GR_KB_CTRL
|
WXK_UP
:
case
GR_KB_CTRL
|
WXK_NUMPAD2
:
case
GR_KB_CTRL
|
WXK_DOWN
:
case
GR_KB_CTRL
|
WXK_NUMPAD4
:
case
GR_KB_CTRL
|
WXK_LEFT
:
case
GR_KB_CTRL
|
WXK_NUMPAD6
:
case
GR_KB_CTRL
|
WXK_RIGHT
:
case
WXK_NUMPAD8
:
case
WXK_UP
:
case
WXK_NUMPAD2
:
case
WXK_DOWN
:
case
WXK_NUMPAD4
:
case
WXK_LEFT
:
case
WXK_NUMPAD6
:
case
WXK_RIGHT
:
// All these keys have almost the same treatment
case
GR_KB_CTRL
|
WXK_NUMPAD8
:
case
GR_KB_CTRL
|
WXK_UP
:
case
GR_KB_CTRL
|
WXK_NUMPAD2
:
case
GR_KB_CTRL
|
WXK_DOWN
:
case
GR_KB_CTRL
|
WXK_NUMPAD4
:
case
GR_KB_CTRL
|
WXK_LEFT
:
case
GR_KB_CTRL
|
WXK_NUMPAD6
:
case
GR_KB_CTRL
|
WXK_RIGHT
:
case
WXK_NUMPAD8
:
case
WXK_UP
:
case
WXK_NUMPAD2
:
case
WXK_DOWN
:
case
WXK_NUMPAD4
:
case
WXK_LEFT
:
case
WXK_NUMPAD6
:
case
WXK_RIGHT
:
{
/* Here's a tricky part: when doing cursor key movement, the
* 'previous' point should be taken from memory, *not* from the
...
...
common/draw_panel.cpp
View file @
d41bc31c
...
...
@@ -1495,7 +1495,9 @@ void EDA_DRAW_PANEL::CallMouseCapture( wxDC* aDC, const wxPoint& aPosition, bool
void
EDA_DRAW_PANEL
::
CallEndMouseCapture
(
wxDC
*
aDC
)
{
wxCHECK_RET
(
aDC
!=
NULL
,
wxT
(
"Invalid device context."
)
);
wxCHECK_RET
(
m_endMouseCaptureCallback
!=
NULL
,
wxT
(
"End mouse capture callback not set."
)
);
m_endMouseCaptureCallback
(
this
,
aDC
);
// CallEndMouseCapture is sometimes called with m_endMouseCaptureCallback == NULL
// for instance after an ABORT in block paste.
if
(
m_endMouseCaptureCallback
)
m_endMouseCaptureCallback
(
this
,
aDC
);
}
eeschema/block.cpp
View file @
d41bc31c
...
...
@@ -292,7 +292,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
m_canvas
->
Refresh
();
break
;
case
BLOCK_SAVE
:
case
BLOCK_SAVE
:
// Save acopy of items in paste buffer
GetScreen
()
->
UpdatePickList
();
DrawAndSizingBlockOutlines
(
m_canvas
,
aDC
,
wxDefaultPosition
,
false
);
...
...
eeschema/hotkeys.cpp
View file @
d41bc31c
...
...
@@ -428,7 +428,7 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
case
HK_ZOOM_CENTER
:
case
HK_ZOOM_AUTO
:
case
HK_MOVEBLOCK_TO_DRAGBLOCK
:
// Switch to drag mode, when block moving
case
HK_SAVE_BLOCK
:
// Copy block to
clip board
.
case
HK_SAVE_BLOCK
:
// Copy block to
paste buffer
.
cmd
.
SetId
(
hotKey
->
m_IdMenuEvent
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
...
...
pcbnew/tools/pcbnew_control.cpp
View file @
d41bc31c
...
...
@@ -139,7 +139,7 @@ int PCBNEW_CONTROL::ZoomPreset( const TOOL_EVENT& aEvent )
{
return
ZoomFitScreen
(
aEvent
);
}
else
if
(
idx
<
0
||
idx
>=
zoomList
.
size
()
)
else
if
(
idx
>=
zoomList
.
size
()
)
{
assert
(
false
);
return
0
;
...
...
pcbnew/tools/selection_tool.cpp
View file @
d41bc31c
...
...
@@ -72,6 +72,8 @@ SELECTION_TOOL::SELECTION_TOOL() :
m_frame
(
NULL
),
m_additive
(
false
),
m_multiple
(
false
),
m_editModules
(
false
),
m_locked
(
true
)
{
// Do not leave uninitialized members:
m_preliminary
=
false
;
}
...
...
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