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
13e67e1f
Commit
13e67e1f
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed VIEW::SetViewport().
parent
cc733a49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
view.cpp
common/view/view.cpp
+7
-11
class_pad.cpp
pcbnew/class_pad.cpp
+1
-1
No files found.
common/view/view.cpp
View file @
13e67e1f
...
...
@@ -252,9 +252,7 @@ void VIEW::SetGAL( GAL* aGal )
clearGroupCache
();
// every target has to be refreshed
MarkTargetDirty
(
TARGET_CACHED
);
MarkTargetDirty
(
TARGET_NONCACHED
);
MarkTargetDirty
(
TARGET_OVERLAY
);
MarkDirty
();
// force the new GAL to display the current viewport.
SetCenter
(
m_center
);
...
...
@@ -279,7 +277,7 @@ void VIEW::SetViewport( const BOX2D& aViewport, bool aKeepAspect )
VECTOR2D
ssize
=
ToWorld
(
m_gal
->
GetScreenPixelSize
(),
false
);
VECTOR2D
centre
=
aViewport
.
Centre
();
VECTOR2D
vsize
=
aViewport
.
GetSize
();
double
zoom
=
1.0
/
std
::
m
in
(
fabs
(
vsize
.
x
/
ssize
.
x
),
fabs
(
vsize
.
y
/
ssize
.
y
)
);
double
zoom
=
1.0
/
std
::
m
ax
(
fabs
(
vsize
.
x
/
ssize
.
x
),
fabs
(
vsize
.
y
/
ssize
.
y
)
);
SetCenter
(
centre
);
SetScale
(
GetScale
()
*
zoom
);
...
...
@@ -305,7 +303,7 @@ void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor )
m_scale
=
aScale
;
// Redraw everything after the viewport has changed
Mark
TargetDirty
(
TARGET_CACHED
);
Mark
Dirty
(
);
}
...
...
@@ -317,7 +315,7 @@ void VIEW::SetCenter( const VECTOR2D& aCenter )
m_gal
->
ComputeWorldScreenMatrix
();
// Redraw everything after the viewport has changed
Mark
TargetDirty
(
TARGET_CACHED
);
Mark
Dirty
(
);
}
...
...
@@ -574,7 +572,7 @@ struct VIEW::drawItem
}
VIEW
*
view
;
int
layer
,
layers
Count
,
layers
[
VIEW_MAX_LAYERS
];
int
layer
,
layers
[
VIEW_MAX_LAYERS
];
};
...
...
@@ -734,9 +732,7 @@ void VIEW::ClearTargets()
m_gal
->
ClearTarget
(
TARGET_NONCACHED
);
m_gal
->
ClearTarget
(
TARGET_CACHED
);
MarkTargetDirty
(
TARGET_NONCACHED
);
MarkTargetDirty
(
TARGET_CACHED
);
MarkTargetDirty
(
TARGET_OVERLAY
);
MarkDirty
();
}
if
(
IsTargetDirty
(
TARGET_OVERLAY
)
)
...
...
@@ -855,7 +851,7 @@ void VIEW::sortLayers()
sort
(
m_orderedLayers
.
begin
(),
m_orderedLayers
.
end
(),
compareRenderingOrder
);
Mark
TargetDirty
(
TARGET_CACHED
);
Mark
Dirty
(
);
}
...
...
pcbnew/class_pad.cpp
View file @
13e67e1f
...
...
@@ -924,7 +924,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
unsigned
int
D_PAD
::
ViewGetLOD
(
int
aLayer
)
const
{
// Netnames
and soldermasks
will be shown only if zoom is appropriate
// Netnames will be shown only if zoom is appropriate
if
(
IsNetnameLayer
(
aLayer
)
)
{
return
(
100000000
/
std
::
max
(
m_Size
.
x
,
m_Size
.
y
)
);
...
...
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