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
01d4080e
Commit
01d4080e
authored
Aug 30, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added selection box for DIMENSION.
parent
fb9a4c2b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
23 deletions
+46
-23
class_dimension.cpp
pcbnew/class_dimension.cpp
+12
-0
class_dimension.h
pcbnew/class_dimension.h
+3
-0
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+30
-22
pcb_painter.h
pcbnew/pcb_painter.h
+1
-1
No files found.
pcbnew/class_dimension.cpp
View file @
01d4080e
...
@@ -489,6 +489,18 @@ wxString DIMENSION::GetSelectMenuText() const
...
@@ -489,6 +489,18 @@ wxString DIMENSION::GetSelectMenuText() const
}
}
void
DIMENSION
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
// Layer that simply displays the text
aLayers
[
0
]
=
m_Layer
;
// On the general purpose overlay there is a selection box displayed
aLayers
[
1
]
=
ITEM_GAL_LAYER
(
GP_OVERLAY
);
aCount
=
2
;
}
EDA_ITEM
*
DIMENSION
::
Clone
()
const
EDA_ITEM
*
DIMENSION
::
Clone
()
const
{
{
return
new
DIMENSION
(
*
this
);
return
new
DIMENSION
(
*
this
);
...
...
pcbnew/class_dimension.h
View file @
01d4080e
...
@@ -144,6 +144,9 @@ public:
...
@@ -144,6 +144,9 @@ public:
EDA_ITEM
*
Clone
()
const
;
EDA_ITEM
*
Clone
()
const
;
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
#if defined(DEBUG)
#if defined(DEBUG)
virtual
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
virtual
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
#endif
#endif
...
...
pcbnew/pcb_painter.cpp
View file @
01d4080e
...
@@ -236,7 +236,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
...
@@ -236,7 +236,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
break
;
break
;
case
PCB_DIMENSION_T
:
case
PCB_DIMENSION_T
:
draw
(
(
DIMENSION
*
)
aItem
);
draw
(
(
DIMENSION
*
)
aItem
,
aLayer
);
break
;
break
;
case
PCB_TARGET_T
:
case
PCB_TARGET_T
:
...
@@ -784,8 +784,15 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone )
...
@@ -784,8 +784,15 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone )
}
}
void
PCB_PAINTER
::
draw
(
const
DIMENSION
*
aDimension
)
void
PCB_PAINTER
::
draw
(
const
DIMENSION
*
aDimension
,
int
aLayer
)
{
{
if
(
aLayer
==
ITEM_GAL_LAYER
(
GP_OVERLAY
)
)
{
if
(
aDimension
->
IsSelected
()
)
drawSelectionBox
(
aDimension
);
}
else
{
int
layer
=
aDimension
->
GetLayer
();
int
layer
=
aDimension
->
GetLayer
();
COLOR4D
strokeColor
=
GetColor
(
NULL
,
layer
);
COLOR4D
strokeColor
=
GetColor
(
NULL
,
layer
);
...
@@ -807,6 +814,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension )
...
@@ -807,6 +814,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension )
// Draw text
// Draw text
draw
(
&
aDimension
->
Text
(),
layer
);
draw
(
&
aDimension
->
Text
(),
layer
);
}
}
}
...
...
pcbnew/pcb_painter.h
View file @
01d4080e
...
@@ -145,7 +145,7 @@ protected:
...
@@ -145,7 +145,7 @@ protected:
void
draw
(
const
TEXTE_PCB
*
,
int
);
void
draw
(
const
TEXTE_PCB
*
,
int
);
void
draw
(
const
TEXTE_MODULE
*
,
int
);
void
draw
(
const
TEXTE_MODULE
*
,
int
);
void
draw
(
const
ZONE_CONTAINER
*
);
void
draw
(
const
ZONE_CONTAINER
*
);
void
draw
(
const
DIMENSION
*
);
void
draw
(
const
DIMENSION
*
,
int
);
void
draw
(
const
PCB_TARGET
*
);
void
draw
(
const
PCB_TARGET
*
);
/// Draws a white semitransparent box indicating an item as selected
/// Draws a white semitransparent box indicating an item as selected
...
...
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