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
8300fe18
Commit
8300fe18
authored
Oct 09, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
todo.txt update
parent
c931d47a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
18 deletions
+51
-18
base_screen.cpp
common/base_screen.cpp
+4
-3
classpcb.cpp
pcbnew/classpcb.cpp
+10
-4
drawpanel.cpp
share/drawpanel.cpp
+31
-11
todo.txt
todo.txt
+6
-0
No files found.
common/base_screen.cpp
View file @
8300fe18
...
...
@@ -37,8 +37,10 @@ BASE_SCREEN::~BASE_SCREEN()
{
if
(
m_ZoomList
)
free
(
m_ZoomList
);
if
(
m_GridList
)
free
(
m_GridList
);
ClearUndoRedoList
();
}
...
...
@@ -110,9 +112,8 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
{
wxPoint
curpos
;
curpos
.
x
=
ScreenPos
.
x
*
GetZoom
();
curpos
.
y
=
ScreenPos
.
y
*
GetZoom
();
curpos
.
x
=
ScreenPos
.
x
*
GetZoom
();
curpos
.
y
=
ScreenPos
.
y
*
GetZoom
();
curpos
.
x
+=
m_DrawOrg
.
x
;
curpos
.
y
+=
m_DrawOrg
.
y
;
...
...
pcbnew/classpcb.cpp
View file @
8300fe18
...
...
@@ -319,14 +319,20 @@ void MARQUEUR::Display_Infos( WinEDA_DrawFrame* frame )
bool
MARQUEUR
::
HitTest
(
const
wxPoint
&
refPos
)
{
// currently the MARKER is about 14 pixels by 14 pixels
int
xCenter
=
m_Pos
.
x
+
7
;
int
yCenter
=
m_Pos
.
y
+
7
;
// the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
// as zoom changes, the effective real size of the MARKER changes.
// @todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
const
int
halfSize
=
6
;
int
xCenter
=
m_Pos
.
x
+
halfSize
;
int
yCenter
=
m_Pos
.
y
+
halfSize
;
int
dx
=
refPos
.
x
-
xCenter
;
int
dy
=
refPos
.
y
-
yCenter
;
if
(
ABS
(
dx
)
<=
7
&&
ABS
(
dy
)
<=
7
)
if
(
ABS
(
dx
)
<=
halfSize
&&
ABS
(
dy
)
<=
halfSize
)
return
true
;
else
return
false
;
...
...
share/drawpanel.cpp
View file @
8300fe18
...
...
@@ -195,9 +195,13 @@ wxPoint WinEDA_DrawPanel::CalcAbsolutePosition( const wxPoint& rel_pos )
CalcUnscrolledPosition
(
rel_pos
.
x
,
rel_pos
.
y
,
&
pos
.
x
,
&
pos
.
y
);
#else
int
ii
,
jj
;
GetViewStart
(
&
pos
.
x
,
&
pos
.
y
);
GetScrollPixelsPerUnit
(
&
ii
,
&
jj
);
pos
.
x
*=
ii
;
pos
.
y
*=
jj
;
pos
.
x
*=
ii
;
pos
.
y
*=
jj
;
pos
.
x
+=
rel_pos
.
x
;
pos
.
y
+=
rel_pos
.
y
;
#endif
...
...
@@ -243,11 +247,16 @@ bool WinEDA_DrawPanel::IsPointOnDisplay( wxPoint ref_pos )
// Conversion en coord physiques
pos
=
CalcAbsolutePosition
(
display_rect
.
GetPosition
()
);
pos
.
x
*=
GetZoom
();
pos
.
y
*=
GetZoom
();
pos
.
x
+=
GetScreen
()
->
m_DrawOrg
.
x
;
pos
.
y
+=
GetScreen
()
->
m_DrawOrg
.
y
;
display_rect
.
SetX
(
pos
.
x
);
display_rect
.
SetY
(
pos
.
y
);
display_rect
.
SetX
(
pos
.
x
);
display_rect
.
SetY
(
pos
.
y
);
display_rect
.
SetWidth
(
display_rect
.
GetWidth
()
*
GetZoom
()
);
display_rect
.
SetHeight
(
display_rect
.
GetHeight
()
*
GetZoom
()
);
...
...
@@ -283,11 +292,15 @@ wxPoint WinEDA_DrawPanel::GetScreenCenterRealPosition()
wxPoint
realpos
;
size
=
GetClientSize
();
size
.
x
/=
2
;
size
.
y
/=
2
;
size
.
x
/=
2
;
size
.
y
/=
2
;
realpos
=
CalcAbsolutePosition
(
wxPoint
(
size
.
x
,
size
.
y
)
);
realpos
.
x
*=
GetZoom
();
realpos
.
y
*=
GetZoom
();
realpos
.
x
+=
GetScreen
()
->
m_DrawOrg
.
x
;
realpos
.
y
+=
GetScreen
()
->
m_DrawOrg
.
y
;
...
...
@@ -576,7 +589,8 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
ii
=
pas_grille_affichee
.
x
/
zoom
;
if
(
ii
<
5
)
{
pas_grille_affichee
.
x
*=
2
;
ii
*=
2
;
pas_grille_affichee
.
x
*=
2
;
ii
*=
2
;
}
if
(
ii
<
5
)
drawgrid
=
FALSE
;
// grille trop petite
...
...
@@ -584,14 +598,18 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
ii
=
pas_grille_affichee
.
y
/
zoom
;
if
(
ii
<
5
)
{
pas_grille_affichee
.
y
*=
2
;
ii
*=
2
;
pas_grille_affichee
.
y
*=
2
;
ii
*=
2
;
}
if
(
ii
<
5
)
drawgrid
=
FALSE
;
// grille trop petite
GetViewStart
(
&
org
.
x
,
&
org
.
y
);
GetScrollPixelsPerUnit
(
&
ii
,
&
jj
);
org
.
x
*=
ii
;
org
.
y
*=
jj
;
org
.
x
*=
ii
;
org
.
y
*=
jj
;
screen
->
m_StartVisu
=
org
;
org
.
x
*=
zoom
;
...
...
@@ -850,12 +868,14 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event )
m_Parent
->
OnLeftDClick
(
&
DC
,
screen
->
m_MousePositionInPixels
);
IgnoreNextLeftButtonRelease
=
true
;
}
else
if
(
event
.
LeftUp
()
&&
screen
->
BlockLocate
.
m_State
==
STATE_NO_BLOCK
)
if
(
!
IgnoreNextLeftButtonRelease
)
m_Parent
->
OnLeftClick
(
&
DC
,
screen
->
m_MousePositionInPixels
);
if
(
event
.
LeftUp
()
)
IgnoreNextLeftButtonRelease
=
false
;
else
if
(
event
.
LeftUp
()
)
{
if
(
screen
->
BlockLocate
.
m_State
==
STATE_NO_BLOCK
&&
!
IgnoreNextLeftButtonRelease
)
m_Parent
->
OnLeftClick
(
&
DC
,
screen
->
m_MousePositionInPixels
);
IgnoreNextLeftButtonRelease
=
false
;
}
if
(
event
.
ButtonUp
(
2
)
&&
(
screen
->
BlockLocate
.
m_State
==
STATE_NO_BLOCK
)
)
{
...
...
todo.txt
View file @
8300fe18
...
...
@@ -56,3 +56,9 @@ when Undo/Redo stack is empty/filled.
can now identify a marker. To see where the user gets a menu to delete a marker:
void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
*** fix MARQUEUR::HitTest():
the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
as zoom changes, the effective real size of the MARKER changes.
@todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
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