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
3f15b9c0
Commit
3f15b9c0
authored
Dec 30, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: Fix issue in Search/ReplaceAll
Pcbnew: fix a very minor issue.
parent
e420623f
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
686 additions
and
17 deletions
+686
-17
class_libentry.cpp
eeschema/class_libentry.cpp
+5
-2
dialog_sch_find.fbp
eeschema/dialogs/dialog_sch_find.fbp
+661
-2
dialog_schematic_find_base.cpp
eeschema/dialogs/dialog_schematic_find_base.cpp
+2
-3
dialog_schematic_find_base.h
eeschema/dialogs/dialog_schematic_find_base.h
+7
-6
find.cpp
eeschema/find.cpp
+3
-3
files.cpp
pcbnew/files.cpp
+0
-1
initpcb.cpp
pcbnew/initpcb.cpp
+8
-0
No files found.
eeschema/class_libentry.cpp
View file @
3f15b9c0
...
...
@@ -756,7 +756,7 @@ bool LIB_COMPONENT::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
if
(
(
p
=
strtok
(
NULL
,
"
\t\n
"
)
)
!=
NULL
&&
*
p
==
'P'
)
m_options
=
ENTRY_POWER
;
/
* Read next lines */
/
/ Read next lines, until "ENDDEF" is found
while
(
aLineReader
.
ReadLine
()
)
{
line
=
aLineReader
.
Line
();
...
...
@@ -766,11 +766,14 @@ bool LIB_COMPONENT::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
/* This is the error flag ( if an error occurs, Res = FALSE) */
Res
=
true
;
if
(
*
line
==
'#'
)
// a comment
continue
;
if
(
(
*
line
==
'T'
)
&&
(
*
(
line
+
1
)
==
'i'
)
)
Res
=
LoadDateAndTime
(
aLineReader
);
else
if
(
*
line
==
'F'
)
Res
=
LoadField
(
aLineReader
,
Msg
);
else
if
(
strcmp
(
p
,
"ENDDEF"
)
==
0
)
else
if
(
strcmp
(
p
,
"ENDDEF"
)
==
0
)
// End of component description
break
;
else
if
(
strcmp
(
p
,
"DRAW"
)
==
0
)
Res
=
LoadDrawEntries
(
aLineReader
,
Msg
);
...
...
eeschema/dialogs/dialog_sch_find.fbp
View file @
3f15b9c0
This diff is collapsed.
Click to expand it.
eeschema/dialogs/dialog_schematic_find_base.cpp
View file @
3f15b9c0
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Sep 8 2010
)
// C++ code generated with wxFormBuilder (version
Jun 30 2011
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -117,14 +117,13 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
rightSizer
->
Add
(
m_buttonReplaceAll
,
0
,
wxBOTTOM
|
wxEXPAND
|
wxLEFT
|
wxRIGHT
,
6
);
m_buttonCancel
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"C
ancel
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_buttonCancel
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"C
lose
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
rightSizer
->
Add
(
m_buttonCancel
,
0
,
wxBOTTOM
|
wxLEFT
|
wxRIGHT
|
wxEXPAND
,
6
);
mainSizer
->
Add
(
rightSizer
,
0
,
wxALL
|
wxEXPAND
,
6
);
this
->
SetSizer
(
mainSizer
);
this
->
Layout
();
mainSizer
->
Fit
(
this
);
this
->
Centre
(
wxBOTH
);
...
...
eeschema/dialogs/dialog_schematic_find_base.h
View file @
3f15b9c0
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Sep 8 2010
)
// C++ code generated with wxFormBuilder (version
Jun 30 2011
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __
dialog_schematic_find_base
__
#define __
dialog_schematic_find_base
__
#ifndef __
DIALOG_SCHEMATIC_FIND_BASE_H
__
#define __
DIALOG_SCHEMATIC_FIND_BASE_H
__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
...
...
@@ -69,9 +70,9 @@ class DIALOG_SCH_FIND_BASE : public wxDialog
public
:
DIALOG_SCH_FIND_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Find"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wx
DefaultSize
,
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
DIALOG_SCH_FIND_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Find"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wx
Size
(
334
,
225
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_SCH_FIND_BASE
();
};
#endif //__
dialog_schematic_find_base
__
#endif //__
DIALOG_SCHEMATIC_FIND_BASE_H
__
eeschema/find.cpp
View file @
3f15b9c0
...
...
@@ -403,6 +403,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
if
(
m_foundItems
.
ReplaceItem
()
)
{
OnModify
();
SaveUndoItemInUndoList
(
undoItem
);
RedrawScreen
(
data
.
GetPosition
(),
warpCursor
);
}
...
...
@@ -411,9 +412,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
if
(
aEvent
.
GetEventType
()
==
wxEVT_COMMAND_FIND_REPLACE_ALL
)
{
item
=
(
SCH_ITEM
*
)
m_foundItems
.
GetItem
(
data
);
while
(
item
!=
NULL
)
while
(
(
item
=
(
SCH_ITEM
*
)
m_foundItems
.
GetItem
(
data
)
)
!=
NULL
)
{
wxLogTrace
(
traceFindReplace
,
wxT
(
"Replacing %s with %s in item %s"
),
GetChars
(
aEvent
.
GetFindString
()
),
GetChars
(
aEvent
.
GetReplaceString
()
),
...
...
@@ -429,6 +428,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
if
(
m_foundItems
.
ReplaceItem
()
)
{
OnModify
();
SaveUndoItemInUndoList
(
undoItem
);
RedrawScreen
(
data
.
GetPosition
(),
warpCursor
);
}
...
...
pcbnew/files.cpp
View file @
3f15b9c0
...
...
@@ -300,7 +300,6 @@ this file again." ) );
}
catch
(
IO_ERROR
ioe
)
{
wxMessageBox
(
_
(
"catch"
)
);
wxString
msg
=
wxString
::
Format
(
_
(
"Error loading board.
\n
%s"
),
ioe
.
errorText
.
GetData
()
);
wxMessageBox
(
msg
,
_
(
"Open Board File"
),
wxOK
|
wxICON_ERROR
);
...
...
pcbnew/initpcb.cpp
View file @
3f15b9c0
...
...
@@ -37,9 +37,17 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery )
// Clear undo and redo lists because we want a full deletion
GetScreen
()
->
ClearUndoRedoList
();
/* Items visibility flags will be set becuse a new board will be created.
* Grid and ratsnest can be left to their previous state
*/
bool
showGrid
=
IsElementVisible
(
GRID_VISIBLE
);
bool
showRats
=
IsElementVisible
(
RATSNEST_VISIBLE
);
// delete the old BOARD and create a new BOARD so that the default
// layer names are put into the BOARD.
SetBoard
(
new
BOARD
()
);
SetElementVisibility
(
GRID_VISIBLE
,
showGrid
);
SetElementVisibility
(
RATSNEST_VISIBLE
,
showRats
);
SetCurItem
(
NULL
);
/* clear filename, to avoid overwriting an old file */
...
...
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