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
0d6c62a9
Commit
0d6c62a9
authored
Feb 10, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug (only in my last commit) fixed under Windows. Removed some warnings in compilation
parent
af4e798b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
35 deletions
+38
-35
base_screen.cpp
common/base_screen.cpp
+10
-6
edaappl.cpp
common/edaappl.cpp
+4
-3
zoom.cpp
common/zoom.cpp
+3
-5
displayframe.cpp
cvpcb/displayframe.cpp
+4
-4
controle.cpp
eeschema/controle.cpp
+12
-12
gerberframe.cpp
gerbview/gerberframe.cpp
+1
-1
controle.cpp
pcbnew/controle.cpp
+4
-4
No files found.
common/base_screen.cpp
View file @
0d6c62a9
...
...
@@ -154,11 +154,8 @@ int BASE_SCREEN::Scale( int coord )
#ifdef WX_ZOOM
return
coord
;
#else
if
(
!
m_Zoom
)
return
0
;
if
(
!
m_ZoomScalar
||
!
m_Zoom
)
return
0
;
return
coord
;
return
wxRound
(
(
double
)
(
coord
*
m_ZoomScalar
)
/
(
double
)
m_Zoom
);
#endif
...
...
@@ -173,8 +170,15 @@ void BASE_SCREEN::Scale( wxPoint& pt )
void
BASE_SCREEN
::
Scale
(
wxRealPoint
&
pt
)
{
pt
.
x
=
Scale
(
pt
.
x
);
pt
.
y
=
Scale
(
pt
.
y
);
#ifdef WX_ZOOM
// No change
#else
if
(
!
m_ZoomScalar
||
!
m_Zoom
)
return
;
pt
.
x
=
pt
.
x
*
m_ZoomScalar
/
(
double
)
m_Zoom
;
pt
.
y
=
pt
.
y
*
m_ZoomScalar
/
(
double
)
m_Zoom
;
#endif
}
...
...
common/edaappl.cpp
View file @
0d6c62a9
...
...
@@ -442,15 +442,16 @@ bool WinEDA_App::SetBinDir()
m_BinDir
=
argv
[
0
];
#endif
/* __UNIX__ */
while
(
m_BinDir
.
Last
()
!=
DIR_SEP
)
m_BinDir
.
RemoveLast
();
/* Use unix notation for paths. I am not sure this is a good idea,
* but it simplify compatibility between Windows and Unices
* However it is a potential problem in path handling under Windows
*/
m_BinDir
.
Replace
(
WIN_STRING_DIR_SEP
,
UNIX_STRING_DIR_SEP
);
// Remove filename form command line:
while
(
m_BinDir
.
Last
()
!=
'/'
)
m_BinDir
.
RemoveLast
();
wxFileName
pfn
(
wxT
(
"/posix/path/specification"
),
wxT
(
"filename"
)
);
wxFileName
wfn
(
wxT
(
"
\\
windows
\\
path
\\
specification"
),
wxT
(
"filename"
)
);
wxLogDebug
(
wxT
(
"Posix path: "
)
+
pfn
.
GetFullPath
()
);
...
...
common/zoom.cpp
View file @
0d6c62a9
...
...
@@ -51,10 +51,8 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord )
if
(
!
GetBaseScreen
()
->
m_UserGridIsON
)
{
coord
->
x
=
(
(
int
)
round
(
coord
->
x
/
grid_size
.
x
)
)
*
grid_size
.
x
;
coord
->
y
=
(
(
int
)
round
(
coord
->
y
/
grid_size
.
y
)
)
*
grid_size
.
y
;
coord
->
x
=
(
int
)
round
(
(
coord
->
x
/
grid_size
.
x
)
*
grid_size
.
x
);
coord
->
y
=
(
int
)
round
(
(
coord
->
y
/
grid_size
.
y
)
*
grid_size
.
y
);
}
}
...
...
@@ -246,7 +244,7 @@ void WinEDA_DrawPanel::AddMenuZoom( wxMenu* MasterMenu )
for
(
i
=
0
;
i
<
GetScreen
()
->
m_GridList
.
GetCount
();
i
++
)
{
tmp
=
GetScreen
()
->
m_GridList
[
i
];
gridValue
=
To_User_Unit
(
g_UnitMetric
,
tmp
.
m_Size
.
x
,
gridValue
=
To_User_Unit
(
g_UnitMetric
,
(
int
)
round
(
tmp
.
m_Size
.
x
)
,
(
(
WinEDA_DrawFrame
*
)
m_Parent
)
->
m_InternalUnits
);
if
(
tmp
.
m_Id
==
ID_POPUP_GRID_USER
)
{
...
...
cvpcb/displayframe.cpp
View file @
0d6c62a9
...
...
@@ -234,25 +234,25 @@ void WinEDA_DisplayFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
case
WXK_NUMPAD8
:
/* cursor moved up */
case
WXK_UP
:
Mouse
.
y
-=
delta
.
y
;
Mouse
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD2
:
/* cursor moved down */
case
WXK_DOWN
:
Mouse
.
y
+=
delta
.
y
;
Mouse
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD4
:
/* cursor moved left */
case
WXK_LEFT
:
Mouse
.
x
-=
delta
.
x
;
Mouse
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD6
:
/* cursor moved right */
case
WXK_RIGHT
:
Mouse
.
x
+=
delta
.
x
;
Mouse
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
}
...
...
eeschema/controle.cpp
View file @
0d6c62a9
...
...
@@ -248,25 +248,25 @@ void WinEDA_SchematicFrame::GeneralControle( wxDC* DC, wxPoint MousePositionInPi
case
WXK_NUMPAD8
:
/* Deplacement curseur vers le haut */
case
WXK_UP
:
MousePositionInPixels
.
y
-=
delta
.
y
;
MousePositionInPixels
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD2
:
/* Deplacement curseur vers le bas */
case
WXK_DOWN
:
MousePositionInPixels
.
y
+=
delta
.
y
;
MousePositionInPixels
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD4
:
/* Deplacement curseur vers la gauche */
case
WXK_LEFT
:
MousePositionInPixels
.
x
-=
delta
.
x
;
MousePositionInPixels
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD6
:
/* Deplacement curseur vers la droite */
case
WXK_RIGHT
:
MousePositionInPixels
.
x
+=
delta
.
x
;
MousePositionInPixels
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
...
...
@@ -342,25 +342,25 @@ void WinEDA_LibeditFrame::GeneralControle( wxDC* DC, wxPoint MousePositionInPixe
case
WXK_NUMPAD8
:
/* Deplacement curseur vers le haut */
case
WXK_UP
:
MousePositionInPixels
.
y
-=
delta
.
y
;
MousePositionInPixels
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD2
:
/* Deplacement curseur vers le bas */
case
WXK_DOWN
:
MousePositionInPixels
.
y
+=
delta
.
y
;
MousePositionInPixels
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD4
:
/* Deplacement curseur vers la gauche */
case
WXK_LEFT
:
MousePositionInPixels
.
x
-=
delta
.
x
;
MousePositionInPixels
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD6
:
/* Deplacement curseur vers la droite */
case
WXK_RIGHT
:
MousePositionInPixels
.
x
+=
delta
.
x
;
MousePositionInPixels
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
...
...
@@ -436,25 +436,25 @@ void WinEDA_ViewlibFrame::GeneralControle( wxDC* DC,
case
WXK_NUMPAD8
:
/* Deplacement curseur vers le haut */
case
WXK_UP
:
MousePositionInPixels
.
y
-=
delta
.
y
;
MousePositionInPixels
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD2
:
/* Deplacement curseur vers le bas */
case
WXK_DOWN
:
MousePositionInPixels
.
y
+=
delta
.
y
;
MousePositionInPixels
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD4
:
/* Deplacement curseur vers la gauche */
case
WXK_LEFT
:
MousePositionInPixels
.
x
-=
delta
.
x
;
MousePositionInPixels
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
case
WXK_NUMPAD6
:
/* Deplacement curseur vers la droite */
case
WXK_RIGHT
:
MousePositionInPixels
.
x
+=
delta
.
x
;
MousePositionInPixels
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
MousePositionInPixels
);
break
;
...
...
gerbview/gerberframe.cpp
View file @
0d6c62a9
...
...
@@ -315,5 +315,5 @@ int WinEDA_GerberFrame::BestZoom()
jj
=
GetBoard
()
->
m_BoundaryBox
.
GetHeight
()
/
size
.
y
;
bestzoom
=
MAX
(
ii
,
jj
);
GetScreen
()
->
m_Curseur
=
GetBoard
()
->
m_BoundaryBox
.
Centre
();
return
bestzoom
*
GetScreen
()
->
m_ZoomScalar
;
return
(
int
)
round
(
bestzoom
*
GetScreen
()
->
m_ZoomScalar
)
;
}
pcbnew/controle.cpp
View file @
0d6c62a9
...
...
@@ -530,25 +530,25 @@ void WinEDA_PcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
{
case
WXK_NUMPAD8
:
/* Deplacement curseur vers le haut */
case
WXK_UP
:
Mouse
.
y
-=
delta
.
y
;
Mouse
.
y
-=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD2
:
/* Deplacement curseur vers le bas */
case
WXK_DOWN
:
Mouse
.
y
+=
delta
.
y
;
Mouse
.
y
+=
(
int
)
round
(
delta
.
y
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD4
:
/* Deplacement curseur vers la gauche */
case
WXK_LEFT
:
Mouse
.
x
-=
delta
.
x
;
Mouse
.
x
-=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
case
WXK_NUMPAD6
:
/* Deplacement curseur vers la droite */
case
WXK_RIGHT
:
Mouse
.
x
+=
delta
.
x
;
Mouse
.
x
+=
(
int
)
round
(
delta
.
x
)
;
DrawPanel
->
MouseTo
(
Mouse
);
break
;
...
...
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