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
6824dc71
Commit
6824dc71
authored
May 08, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this helps zooming on some window types
parent
40ccdd57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
drawframe.cpp
common/drawframe.cpp
+13
-7
No files found.
common/drawframe.cpp
View file @
6824dc71
...
...
@@ -394,7 +394,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
}
double
EDA_DRAW_FRAME
::
GetZoom
(
void
)
double
EDA_DRAW_FRAME
::
GetZoom
()
{
return
GetScreen
()
->
GetZoom
();
}
...
...
@@ -697,7 +697,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
double
scale
=
screen
->
GetScalingFactor
();
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Center Position = ( %d, %d ), scale = %.1
6
g"
),
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Center Position = ( %d, %d ), scale = %.1
0
g"
),
aCenterPositionIU
.
x
,
aCenterPositionIU
.
y
,
scale
);
// Calculate the portion of the drawing that can be displayed in the
...
...
@@ -742,6 +742,12 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
centerPositionIU
.
x
=
KiROUND
(
clientRectIU
.
x
+
clientRectIU
.
width
/
2
);
centerPositionIU
.
y
=
KiROUND
(
clientRectIU
.
y
+
clientRectIU
.
height
/
2
);
if
(
screen
->
m_Center
)
{
centerPositionIU
.
x
-=
KiROUND
(
pageRectIU
.
width
/
2.0
);
centerPositionIU
.
y
-=
KiROUND
(
pageRectIU
.
height
/
2.0
);
}
DSIZE
virtualSizeIU
;
if
(
pageRectIU
.
GetLeft
()
<
clientRectIU
.
GetLeft
()
&&
pageRectIU
.
GetRight
()
>
clientRectIU
.
GetRight
()
)
...
...
@@ -846,25 +852,25 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
if
(
posX
<
0
)
{
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar X position %.1
6
g"
),
posX
);
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar X position %.1
0
g"
),
posX
);
posX
=
0
;
}
if
(
posX
>
unitsX
)
{
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar X position %.1
6
g"
),
posX
);
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar X position %.1
0
g"
),
posX
);
posX
=
unitsX
;
}
if
(
posY
<
0
)
{
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar Y position %.1
6
g"
),
posY
);
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar Y position %.1
0
g"
),
posY
);
posY
=
0
;
}
if
(
posY
>
unitsY
)
{
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar Y position %.1
6
g"
),
posY
);
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Required scroll bar Y position %.1
0
g"
),
posY
);
posY
=
unitsY
;
}
...
...
@@ -872,7 +878,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
screen
->
m_ScrollbarNumber
=
wxSize
(
KiROUND
(
unitsX
),
KiROUND
(
unitsY
)
);
wxLogTrace
(
traceScrollSettings
,
wxT
(
"Drawing = (%.1
6g, %.16g), Client = (%.16g, %.16
g), Offset = (%d, %d), SetScrollbars(%d, %d, %d, %d, %d, %d)"
),
wxT
(
"Drawing = (%.1
0g, %.10g), Client = (%.10g, %.10
g), Offset = (%d, %d), SetScrollbars(%d, %d, %d, %d, %d, %d)"
),
virtualSizeIU
.
x
,
virtualSizeIU
.
y
,
clientSizeIU
.
x
,
clientSizeIU
.
y
,
screen
->
m_DrawOrg
.
x
,
screen
->
m_DrawOrg
.
y
,
screen
->
m_ScrollPixelsPerUnitX
,
screen
->
m_ScrollPixelsPerUnitY
,
...
...
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