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
649a7fa3
Commit
649a7fa3
authored
Jun 27, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper handling of toggling outline display of items.
parent
628c069a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+1
-0
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+19
-3
No files found.
pcbnew/basepcbframe.cpp
View file @
649a7fa3
...
@@ -506,6 +506,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
...
@@ -506,6 +506,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
KiGfx
::
PCB_RENDER_SETTINGS
*
settings
=
KiGfx
::
PCB_RENDER_SETTINGS
*
settings
=
static_cast
<
KiGfx
::
PCB_RENDER_SETTINGS
*>
(
painter
->
GetSettings
()
);
static_cast
<
KiGfx
::
PCB_RENDER_SETTINGS
*>
(
painter
->
GetSettings
()
);
settings
->
LoadDisplayOptions
(
DisplayOpt
);
settings
->
LoadDisplayOptions
(
DisplayOpt
);
m_galCanvas
->
GetView
()
->
RecacheAllItems
(
true
);
if
(
IsGalCanvasActive
()
)
if
(
IsGalCanvasActive
()
)
m_galCanvas
->
Refresh
();
m_galCanvas
->
Refresh
();
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
649a7fa3
...
@@ -166,6 +166,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -166,6 +166,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
static_cast
<
KiGfx
::
PCB_PAINTER
*>
(
m_galCanvas
->
GetView
()
->
GetPainter
()
);
static_cast
<
KiGfx
::
PCB_PAINTER
*>
(
m_galCanvas
->
GetView
()
->
GetPainter
()
);
KiGfx
::
PCB_RENDER_SETTINGS
*
settings
=
KiGfx
::
PCB_RENDER_SETTINGS
*
settings
=
static_cast
<
KiGfx
::
PCB_RENDER_SETTINGS
*>
(
painter
->
GetSettings
()
);
static_cast
<
KiGfx
::
PCB_RENDER_SETTINGS
*>
(
painter
->
GetSettings
()
);
bool
recache
=
false
;
#endif
/* KICAD_GAL */
#endif
/* KICAD_GAL */
switch
(
id
)
switch
(
id
)
...
@@ -216,18 +217,26 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -216,18 +217,26 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
case
ID_TB_OPTIONS_SHOW_VIAS_SKETCH
:
case
ID_TB_OPTIONS_SHOW_VIAS_SKETCH
:
m_DisplayViaFill
=
DisplayOpt
.
DisplayViaFill
=
!
state
;
m_DisplayViaFill
=
DisplayOpt
.
DisplayViaFill
=
!
state
;
#ifdef KICAD_GAL
recache
=
true
;
if
(
!
IsGalCanvasActive
()
)
#endif
/* KICAD_GAL */
m_canvas
->
Refresh
();
m_canvas
->
Refresh
();
break
;
break
;
case
ID_TB_OPTIONS_SHOW_TRACKS_SKETCH
:
case
ID_TB_OPTIONS_SHOW_TRACKS_SKETCH
:
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
=
!
state
;
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
=
!
state
;
#ifdef KICAD_GAL
recache
=
true
;
if
(
!
IsGalCanvasActive
()
)
#endif
/* KICAD_GAL */
m_canvas
->
Refresh
();
m_canvas
->
Refresh
();
break
;
break
;
case
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
:
case
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
:
DisplayOpt
.
ContrastModeDisplay
=
state
;
DisplayOpt
.
ContrastModeDisplay
=
state
;
#ifdef KICAD_GAL
#ifdef KICAD_GAL
// Apply new display options to the GAL canvas
// Apply new display options to the GAL canvas
(this is faster than recaching)
settings
->
LoadDisplayOptions
(
DisplayOpt
);
settings
->
LoadDisplayOptions
(
DisplayOpt
);
m_galCanvas
->
GetView
()
->
EnableTopLayer
(
state
);
m_galCanvas
->
GetView
()
->
EnableTopLayer
(
state
);
m_galCanvas
->
GetView
()
->
UpdateAllLayersColor
();
m_galCanvas
->
GetView
()
->
UpdateAllLayersColor
();
...
@@ -261,6 +270,13 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -261,6 +270,13 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
}
}
#ifdef KICAD_GAL
#ifdef KICAD_GAL
if
(
recache
)
{
// Apply new display options to the GAL canvas
settings
->
LoadDisplayOptions
(
DisplayOpt
);
m_galCanvas
->
GetView
()
->
RecacheAllItems
(
true
);
}
if
(
IsGalCanvasActive
()
)
if
(
IsGalCanvasActive
()
)
m_galCanvas
->
Refresh
();
m_galCanvas
->
Refresh
();
#endif
/* KICAD_GAL */
#endif
/* KICAD_GAL */
...
...
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