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
8d6e75fc
Commit
8d6e75fc
authored
Mar 04, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 2 coverity warnings, and cleanup a old code in dialog_color_config.
parent
8cc70d44
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
50 deletions
+22
-50
class_plotter.cpp
common/class_plotter.cpp
+5
-1
grid_tricks.cpp
common/grid_tricks.cpp
+5
-0
dialog_color_config.cpp
eeschema/dialogs/dialog_color_config.cpp
+9
-33
dialog_color_config.h
eeschema/dialogs/dialog_color_config.h
+2
-14
operations_on_items_lists.cpp
eeschema/operations_on_items_lists.cpp
+1
-2
No files found.
common/class_plotter.cpp
View file @
8d6e75fc
...
@@ -54,12 +54,16 @@ PLOTTER::PLOTTER( )
...
@@ -54,12 +54,16 @@ PLOTTER::PLOTTER( )
defaultPenWidth
=
0
;
defaultPenWidth
=
0
;
currentPenWidth
=
-
1
;
// To-be-set marker
currentPenWidth
=
-
1
;
// To-be-set marker
penState
=
'Z'
;
// End-of-path idle
penState
=
'Z'
;
// End-of-path idle
m_plotMirror
=
false
;
// Mirror
flag
m_plotMirror
=
false
;
// Plot mirror option
flag
m_mirrorIsHorizontal
=
true
;
m_mirrorIsHorizontal
=
true
;
m_yaxisReversed
=
false
;
m_yaxisReversed
=
false
;
outputFile
=
0
;
outputFile
=
0
;
colorMode
=
false
;
// Starts as a BW plot
colorMode
=
false
;
// Starts as a BW plot
negativeMode
=
false
;
negativeMode
=
false
;
// Temporary init to avoid not initialized vars, will be set later
m_IUsPerDecimil
=
1
;
// will be set later to the actual value
iuPerDeviceUnit
=
1
;
// will be set later to the actual value
}
}
PLOTTER
::~
PLOTTER
()
PLOTTER
::~
PLOTTER
()
...
...
common/grid_tricks.cpp
View file @
8d6e75fc
...
@@ -50,6 +50,11 @@ enum
...
@@ -50,6 +50,11 @@ enum
GRID_TRICKS
::
GRID_TRICKS
(
wxGrid
*
aGrid
)
:
GRID_TRICKS
::
GRID_TRICKS
(
wxGrid
*
aGrid
)
:
m_grid
(
aGrid
)
m_grid
(
aGrid
)
{
{
m_sel_row_start
=
0
;
m_sel_col_start
=
0
;
m_sel_row_count
=
0
;
m_sel_col_count
=
0
;
aGrid
->
Connect
(
wxEVT_GRID_CELL_RIGHT_CLICK
,
wxGridEventHandler
(
GRID_TRICKS
::
onGridCellRightClick
),
NULL
,
this
);
aGrid
->
Connect
(
wxEVT_GRID_CELL_RIGHT_CLICK
,
wxGridEventHandler
(
GRID_TRICKS
::
onGridCellRightClick
),
NULL
,
this
);
aGrid
->
Connect
(
MYID_FIRST
,
MYID_LAST
,
wxEVT_COMMAND_MENU_SELECTED
,
wxCommandEventHandler
(
GRID_TRICKS
::
onPopupSelection
),
NULL
,
this
);
aGrid
->
Connect
(
MYID_FIRST
,
MYID_LAST
,
wxEVT_COMMAND_MENU_SELECTED
,
wxCommandEventHandler
(
GRID_TRICKS
::
onPopupSelection
),
NULL
,
this
);
aGrid
->
Connect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
GRID_TRICKS
::
onKeyDown
),
NULL
,
this
);
aGrid
->
Connect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
GRID_TRICKS
::
onKeyDown
),
NULL
,
this
);
...
...
eeschema/dialogs/dialog_color_config.cpp
View file @
8d6e75fc
/*
/*
* This program source code file is part of KiCad, a free EDA CAD application.
* This program source code file is part of KiCad, a free EDA CAD application.
*
*
* Copyright (C) 20
07
Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 20
15
Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -110,46 +110,22 @@ static BUTTONINDEX buttonGroups[] = {
...
@@ -110,46 +110,22 @@ static BUTTONINDEX buttonGroups[] = {
static
EDA_COLOR_T
currentColors
[
LAYERSCH_ID_COUNT
];
static
EDA_COLOR_T
currentColors
[
LAYERSCH_ID_COUNT
];
IMPLEMENT_DYNAMIC_CLASS
(
DIALOG_COLOR_CONFIG
,
wxDialog
)
DIALOG_COLOR_CONFIG
::
DIALOG_COLOR_CONFIG
(
EDA_DRAW_FRAME
*
aParent
)
:
DIALOG_SHIM
(
aParent
,
wxID_ANY
,
_
(
"EESchema Colors"
),
wxDefaultPosition
,
wxDefaultSize
,
DIALOG_COLOR_CONFIG
::
DIALOG_COLOR_CONFIG
()
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
)
{
Init
();
}
DIALOG_COLOR_CONFIG
::
DIALOG_COLOR_CONFIG
(
EDA_DRAW_FRAME
*
aParent
)
{
{
m_parent
=
aParent
;
m_parent
=
aParent
;
SetExtraStyle
(
wxWS_EX_BLOCK_EVENTS
);
Init
();
Init
();
Create
(
aParent
);
CreateControls
();
}
DIALOG_COLOR_CONFIG
::~
DIALOG_COLOR_CONFIG
()
GetSizer
()
->
SetSizeHints
(
this
);
{
}
}
bool
DIALOG_COLOR_CONFIG
::
Create
(
wxWindow
*
aParent
,
DIALOG_COLOR_CONFIG
::~
DIALOG_COLOR_CONFIG
()
wxWindowID
aId
,
const
wxString
&
aCaption
,
const
wxPoint
&
aPosition
,
const
wxSize
&
aSize
,
long
aStyle
)
{
{
SetExtraStyle
(
wxWS_EX_BLOCK_EVENTS
);
wxDialog
::
Create
(
aParent
,
aId
,
aCaption
,
aPosition
,
aSize
,
aStyle
);
CreateControls
();
if
(
GetSizer
()
)
{
GetSizer
()
->
SetSizeHints
(
this
);
}
return
true
;
}
}
...
...
eeschema/dialogs/dialog_color_config.h
View file @
8d6e75fc
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#define DIALOG_COLOR_CONFIG_H_
#define DIALOG_COLOR_CONFIG_H_
#include <wx/statline.h>
#include <wx/statline.h>
#include <dialog_shim.h>
class
wxBoxSizer
;
class
wxBoxSizer
;
...
@@ -33,18 +34,13 @@ class wxStaticLine;
...
@@ -33,18 +34,13 @@ class wxStaticLine;
class
wxStdDialogButtonSizer
;
class
wxStdDialogButtonSizer
;
extern
void
SeedLayers
();
/***********************************************/
/***********************************************/
/* Derived class for the frame color settings. */
/* Derived class for the frame color settings. */
/***********************************************/
/***********************************************/
class
DIALOG_COLOR_CONFIG
:
public
wxDialog
class
DIALOG_COLOR_CONFIG
:
public
DIALOG_SHIM
{
{
private
:
private
:
DECLARE_DYNAMIC_CLASS
(
DIALOG_COLOR_CONFIG
)
EDA_DRAW_FRAME
*
m_parent
;
EDA_DRAW_FRAME
*
m_parent
;
wxBoxSizer
*
m_outerBoxSizer
;
wxBoxSizer
*
m_outerBoxSizer
;
wxBoxSizer
*
m_mainBoxSizer
;
wxBoxSizer
*
m_mainBoxSizer
;
...
@@ -55,14 +51,6 @@ private:
...
@@ -55,14 +51,6 @@ private:
wxStaticLine
*
m_line
;
wxStaticLine
*
m_line
;
wxStdDialogButtonSizer
*
m_stdDialogButtonSizer
;
wxStdDialogButtonSizer
*
m_stdDialogButtonSizer
;
// Creation
bool
Create
(
wxWindow
*
aParent
,
wxWindowID
aId
=
wxID_ANY
,
const
wxString
&
aCaption
=
_
(
"EESchema Colors"
),
const
wxPoint
&
aPosition
=
wxDefaultPosition
,
const
wxSize
&
aSize
=
wxDefaultSize
,
long
aStyle
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
// Initializes member variables
// Initializes member variables
void
Init
();
void
Init
();
...
...
eeschema/operations_on_items_lists.cpp
View file @
8d6e75fc
...
@@ -159,8 +159,7 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
...
@@ -159,8 +159,7 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
{
{
wxCHECK_RET
(
aItem
!=
NULL
,
wxT
(
"Cannot delete invalid item."
)
);
wxCHECK_RET
(
aItem
!=
NULL
,
wxT
(
"Cannot delete invalid item."
)
);
if
(
aItem
==
NULL
)
// Here, aItem is not null.
return
;
SCH_SCREEN
*
screen
=
GetScreen
();
SCH_SCREEN
*
screen
=
GetScreen
();
...
...
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