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
a015ff2a
Commit
a015ff2a
authored
Apr 03, 2008
by
diemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup. Relabeled block zoom command.
parent
48858c30
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
12 deletions
+10
-12
libedit_onrightclick.cpp
eeschema/libedit_onrightclick.cpp
+1
-2
onrightclick.cpp
eeschema/onrightclick.cpp
+1
-1
onrightclick.cpp
gerbview/onrightclick.cpp
+3
-4
drawpanel_wxstruct.h
include/drawpanel_wxstruct.h
+1
-1
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+1
-1
onrightclick.cpp
pcbnew/onrightclick.cpp
+1
-1
zoom.cpp
share/zoom.cpp
+2
-2
No files found.
eeschema/libedit_onrightclick.cpp
View file @
a015ff2a
...
@@ -237,8 +237,7 @@ void AddMenusForBlock(wxMenu * PopMenu, WinEDA_LibeditFrame * frame)
...
@@ -237,8 +237,7 @@ void AddMenusForBlock(wxMenu * PopMenu, WinEDA_LibeditFrame * frame)
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_LIBEDIT_CANCEL_EDITING
,
_
(
"Cancel Block"
),
cancel_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_LIBEDIT_CANCEL_EDITING
,
_
(
"Cancel Block"
),
cancel_xpm
);
if
(
frame
->
GetScreen
()
->
BlockLocate
.
m_Command
==
BLOCK_MOVE
)
if
(
frame
->
GetScreen
()
->
BlockLocate
.
m_Command
==
BLOCK_MOVE
)
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_ZOOM_BLOCK
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_ZOOM_BLOCK
,
_
(
"Zoom Block (drag middle mouse)"
),
zoom_selected_xpm
);
_
(
"Win. Zoom (Midd butt drag mouse)"
),
zoom_selected_xpm
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
...
...
eeschema/onrightclick.cpp
View file @
a015ff2a
...
@@ -640,7 +640,7 @@ void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame )
...
@@ -640,7 +640,7 @@ void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame )
if
(
frame
->
GetScreen
()
->
BlockLocate
.
m_Command
==
BLOCK_MOVE
)
if
(
frame
->
GetScreen
()
->
BlockLocate
.
m_Command
==
BLOCK_MOVE
)
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_ZOOM_BLOCK
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_ZOOM_BLOCK
,
_
(
"
Win. Zoom (Midd butt drag
mouse)"
),
zoom_selected_xpm
);
_
(
"
Zoom Block (drag middle
mouse)"
),
zoom_selected_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PLACE_BLOCK
,
_
(
"Place Block"
),
apply_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PLACE_BLOCK
,
_
(
"Place Block"
),
apply_xpm
);
...
...
gerbview/onrightclick.cpp
View file @
a015ff2a
...
@@ -16,9 +16,8 @@
...
@@ -16,9 +16,8 @@
bool
WinEDA_GerberFrame
::
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
bool
WinEDA_GerberFrame
::
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
/********************************************************************************/
/********************************************************************************/
/* Prepare le menu PullUp affich par un click sur le bouton droit
/* Prepare the right-click pullup menu.
* de la souris.
* The menu already has a list of zoom commands.
* Ce menu est ensuite complt par la liste des commandes de ZOOM
*/
*/
{
{
EDA_BaseStruct
*
DrawStruct
=
GetScreen
()
->
GetCurItem
();
EDA_BaseStruct
*
DrawStruct
=
GetScreen
()
->
GetCurItem
();
...
@@ -49,7 +48,7 @@ bool WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
...
@@ -49,7 +48,7 @@ bool WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
if
(
BlockActive
)
if
(
BlockActive
)
{
{
PopMenu
->
Append
(
ID_POPUP_CANCEL_CURRENT_COMMAND
,
_
(
"Cancel Block"
)
);
PopMenu
->
Append
(
ID_POPUP_CANCEL_CURRENT_COMMAND
,
_
(
"Cancel Block"
)
);
PopMenu
->
Append
(
ID_POPUP_ZOOM_BLOCK
,
_
(
"Zoom Block (
Midd butt drag
)"
)
);
PopMenu
->
Append
(
ID_POPUP_ZOOM_BLOCK
,
_
(
"Zoom Block (
drag middle mouse
)"
)
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
PopMenu
->
Append
(
ID_POPUP_PLACE_BLOCK
,
_
(
"Place Block"
)
);
PopMenu
->
Append
(
ID_POPUP_PLACE_BLOCK
,
_
(
"Place Block"
)
);
PopMenu
->
Append
(
ID_POPUP_COPY_BLOCK
,
_
(
"Copy Block (shift mouse)"
)
);
PopMenu
->
Append
(
ID_POPUP_COPY_BLOCK
,
_
(
"Copy Block (shift mouse)"
)
);
...
...
include/drawpanel_wxstruct.h
View file @
a015ff2a
pcbnew/modedit_onclick.cpp
View file @
a015ff2a
...
@@ -215,7 +215,7 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
...
@@ -215,7 +215,7 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_CANCEL_CURRENT_COMMAND
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_CANCEL_CURRENT_COMMAND
,
_
(
"Cancel Block"
),
cancel_xpm
);
_
(
"Cancel Block"
),
cancel_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_ZOOM_BLOCK
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_ZOOM_BLOCK
,
_
(
"Zoom Block (
Midd butt drag
)"
),
zoom_selected_xpm
);
_
(
"Zoom Block (
drag middle mouse
)"
),
zoom_selected_xpm
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PLACE_BLOCK
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PLACE_BLOCK
,
_
(
"Place Block"
),
apply_xpm
);
_
(
"Place Block"
),
apply_xpm
);
...
...
pcbnew/onrightclick.cpp
View file @
a015ff2a
...
@@ -483,7 +483,7 @@ void WinEDA_PcbFrame::createPopUpBlockMenu( wxMenu* menu )
...
@@ -483,7 +483,7 @@ void WinEDA_PcbFrame::createPopUpBlockMenu( wxMenu* menu )
ADD_MENUITEM
(
menu
,
ID_POPUP_CANCEL_CURRENT_COMMAND
,
ADD_MENUITEM
(
menu
,
ID_POPUP_CANCEL_CURRENT_COMMAND
,
_
(
"Cancel Block"
),
cancel_xpm
);
_
(
"Cancel Block"
),
cancel_xpm
);
ADD_MENUITEM
(
menu
,
ID_POPUP_ZOOM_BLOCK
,
ADD_MENUITEM
(
menu
,
ID_POPUP_ZOOM_BLOCK
,
_
(
"Zoom Block (
Midd butt drag
)"
),
zoom_selected_xpm
);
_
(
"Zoom Block (
drag middle mouse
)"
),
zoom_selected_xpm
);
menu
->
AppendSeparator
();
menu
->
AppendSeparator
();
ADD_MENUITEM
(
menu
,
ID_POPUP_PLACE_BLOCK
,
ADD_MENUITEM
(
menu
,
ID_POPUP_PLACE_BLOCK
,
_
(
"Place Block"
),
apply_xpm
);
_
(
"Place Block"
),
apply_xpm
);
...
...
share/zoom.cpp
View file @
a015ff2a
...
@@ -120,7 +120,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
...
@@ -120,7 +120,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
/** Compute the zoom factor and the new draw offset to draw the
/** Compute the zoom factor and the new draw offset to draw the
* selected area (Rect) in full window screen
* selected area (Rect) in full window screen
* @param Rect = selected area t
h
show after zooming
* @param Rect = selected area t
o
show after zooming
*/
*/
{
{
int
ii
,
jj
;
int
ii
,
jj
;
...
@@ -130,7 +130,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
...
@@ -130,7 +130,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
/* Compute the best zoom */
/* Compute the best zoom */
Rect
.
Normalize
();
Rect
.
Normalize
();
size
=
DrawPanel
->
GetClientSize
();
size
=
DrawPanel
->
GetClientSize
();
//
Overestimate zoom level, i. e. show more than selected rather than less.
//
Use ceil to at least show the full rect
ii
=
static_cast
<
int
>
(
ceil
(
1.0
*
Rect
.
GetSize
().
x
/
size
.
x
)
);
ii
=
static_cast
<
int
>
(
ceil
(
1.0
*
Rect
.
GetSize
().
x
/
size
.
x
)
);
jj
=
static_cast
<
int
>
(
ceil
(
1.0
*
Rect
.
GetSize
().
y
/
size
.
y
)
);
jj
=
static_cast
<
int
>
(
ceil
(
1.0
*
Rect
.
GetSize
().
y
/
size
.
y
)
);
bestzoom
=
MAX
(
ii
,
jj
);
bestzoom
=
MAX
(
ii
,
jj
);
...
...
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