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
34e4ec5c
Commit
34e4ec5c
authored
May 17, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Bug 784017 and 784140
parent
94372b81
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
11 deletions
+27
-11
dialog_color_config.cpp
eeschema/dialogs/dialog_color_config.cpp
+25
-8
dialog_color_config.h
eeschema/dialogs/dialog_color_config.h
+1
-1
hotkeys_module_editor.cpp
pcbnew/hotkeys_module_editor.cpp
+1
-2
No files found.
eeschema/dialogs/dialog_color_config.cpp
View file @
34e4ec5c
...
...
@@ -25,7 +25,7 @@ static ColorButton GeneralColorButtons[] = {
{
_
(
"Global label"
),
LAYER_GLOBLABEL
},
{
_
(
"Net name"
),
LAYER_NETNAM
},
{
_
(
"Notes"
),
LAYER_NOTES
},
{
_
(
"No
connection
"
),
LAYER_NOCONNECT
},
{
_
(
"No
Connect Symbol
"
),
LAYER_NOCONNECT
},
{
wxT
(
""
),
-
1
}
// Sentinel marking end of list.
};
...
...
@@ -281,26 +281,43 @@ void DIALOG_COLOR_CONFIG::SetColor( wxCommandEvent& event )
}
void
DIALOG_COLOR_CONFIG
::
UpdateLayer
Settings
()
bool
DIALOG_COLOR_CONFIG
::
UpdateColors
Settings
()
{
for
(
int
i
=
0
;
i
<
MAX_LAYERS
;
i
++
)
g_LayerDescr
.
LayerColor
[
i
]
=
currentColors
[
i
];
// Update color of background
if
(
m_SelBgColor
->
GetSelection
()
==
0
)
g_DrawBgColor
=
WHITE
;
else
g_DrawBgColor
=
BLACK
;
bool
warning
=
false
;
for
(
int
ii
=
0
;
ii
<
MAX_LAYERS
;
ii
++
)
{
g_LayerDescr
.
LayerColor
[
ii
]
=
currentColors
[
ii
];
if
(
g_DrawBgColor
==
g_LayerDescr
.
LayerColor
[
ii
]
)
warning
=
true
;
}
m_Parent
->
SetGridColor
(
g_LayerDescr
.
LayerColor
[
LAYER_GRID
]
);
m_Parent
->
Refresh
();
if
(
g_DrawBgColor
==
g_LayerDescr
.
LayerColor
[
LAYER_GRID
]
)
warning
=
true
;
return
warning
;
}
void
DIALOG_COLOR_CONFIG
::
OnOkClick
(
wxCommandEvent
&
event
)
{
UpdateLayerSettings
();
bool
warning
=
UpdateColorsSettings
();
// Prompt the user if an item has the same color as the background
// because this item cannot be seen:
if
(
warning
)
wxMessageBox
(
_
(
"Warning:
\n
Some items have the same color as the background
\n
and they will not be seen on screen"
)
);
m_Parent
->
DrawPanel
->
Refresh
();
EndModal
(
1
);
}
...
...
@@ -313,7 +330,7 @@ void DIALOG_COLOR_CONFIG::OnCancelClick( wxCommandEvent& event )
void
DIALOG_COLOR_CONFIG
::
OnApplyClick
(
wxCommandEvent
&
event
)
{
Update
Layer
Settings
();
Update
Colors
Settings
();
m_Parent
->
DrawPanel
->
Refresh
();
}
...
...
eeschema/dialogs/dialog_color_config.h
View file @
34e4ec5c
...
...
@@ -70,7 +70,7 @@ private:
wxIcon
GetIconResource
(
const
wxString
&
aName
);
static
bool
ShowToolTips
();
void
UpdateLayer
Settings
();
bool
UpdateColors
Settings
();
void
SetColor
(
wxCommandEvent
&
aEvent
);
void
OnOkClick
(
wxCommandEvent
&
aEvent
);
void
OnCancelClick
(
wxCommandEvent
&
aEvent
);
...
...
pcbnew/hotkeys_module_editor.cpp
View file @
34e4ec5c
...
...
@@ -59,7 +59,6 @@ void WinEDA_ModuleEditFrame::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aP
break
;
case
HK_RESET_LOCAL_COORD
:
/*Reset the relative coord */
if
(
!
blockActive
)
GetScreen
()
->
m_O_Curseur
=
GetScreen
()
->
GetCrossHairPosition
();
break
;
...
...
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