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
82dff765
Commit
82dff765
authored
Apr 30, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: fix minor bugs #1450107 and #1450104 (assertion failures, only visible in Debug mode)
parent
81ea3ce4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
libedit.cpp
eeschema/libedit.cpp
+1
-3
libeditframe.cpp
eeschema/libeditframe.cpp
+27
-3
schedit.cpp
eeschema/schedit.cpp
+7
-1
No files found.
eeschema/libedit.cpp
View file @
82dff765
...
@@ -211,9 +211,7 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, PART_LIB* aLibrar
...
@@ -211,9 +211,7 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, PART_LIB* aLibrar
wxString
cmpName
=
m_aliasName
=
aEntry
->
GetName
();
wxString
cmpName
=
m_aliasName
=
aEntry
->
GetName
();
LIB_ALIAS
*
alias
=
(
LIB_ALIAS
*
)
aEntry
;
LIB_PART
*
lib_part
=
aEntry
->
GetPart
();
LIB_PART
*
lib_part
=
alias
->
GetPart
();
wxASSERT
(
lib_part
);
wxASSERT
(
lib_part
);
...
...
eeschema/libeditframe.cpp
View file @
82dff765
...
@@ -181,9 +181,7 @@ END_EVENT_TABLE()
...
@@ -181,9 +181,7 @@ END_EVENT_TABLE()
LIB_EDIT_FRAME
::
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
)
:
LIB_EDIT_FRAME
::
LIB_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
)
:
SCH_BASE_FRAME
(
aKiway
,
aParent
,
FRAME_SCH_LIB_EDITOR
,
_
(
"Library Editor"
),
SCH_BASE_FRAME
(
aKiway
,
aParent
,
FRAME_SCH_LIB_EDITOR
,
_
(
"Library Editor"
),
wxDefaultPosition
,
wxDefaultSize
,
KICAD_DEFAULT_DRAWFRAME_STYLE
,
GetLibEditFrameName
()
),
wxDefaultPosition
,
wxDefaultSize
,
KICAD_DEFAULT_DRAWFRAME_STYLE
,
GetLibEditFrameName
()
)
m_my_part
(
0
),
m_tempCopyComponent
(
0
)
{
{
wxASSERT
(
aParent
);
wxASSERT
(
aParent
);
...
@@ -196,6 +194,9 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -196,6 +194,9 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_editPinsPerPartOrConvert
=
false
;
m_editPinsPerPartOrConvert
=
false
;
m_repeatPinStep
=
DEFAULT_REPEAT_OFFSET_PIN
;
m_repeatPinStep
=
DEFAULT_REPEAT_OFFSET_PIN
;
m_my_part
=
NULL
;
m_tempCopyComponent
=
NULL
;
// Delayed initialization
// Delayed initialization
if
(
m_textSize
==
-
1
)
if
(
m_textSize
==
-
1
)
m_textSize
=
GetDefaultTextSize
();
m_textSize
=
GetDefaultTextSize
();
...
@@ -231,6 +232,27 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -231,6 +232,27 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
ReCreateMenuBar
();
ReCreateMenuBar
();
ReCreateHToolbar
();
ReCreateHToolbar
();
ReCreateVToolbar
();
ReCreateVToolbar
();
// Ensure the current alias name is valid if a part is loaded
// Sometimes it is not valid. This is the case
// when a part value (the part lib name), or the alias list was modified
// during a previous session and the modifications not saved in lib.
// Reopen libedit in a new session gives a non valid m_aliasName
// because the curr part is reloaded from the library (and this is the unmodified part)
// and the old alias name (from the previous edition) can be invalid
LIB_PART
*
part
=
GetCurPart
();
if
(
part
==
NULL
)
m_aliasName
.
Empty
();
else
if
(
m_aliasName
!=
part
->
GetName
()
)
{
LIB_ALIAS
*
alias
=
part
->
GetAlias
(
m_aliasName
);
if
(
!
alias
)
m_aliasName
=
part
->
GetName
();
}
CreateOptionToolbar
();
CreateOptionToolbar
();
DisplayLibInfos
();
DisplayLibInfos
();
DisplayCmpDoc
();
DisplayCmpDoc
();
...
@@ -278,6 +300,8 @@ LIB_EDIT_FRAME::~LIB_EDIT_FRAME()
...
@@ -278,6 +300,8 @@ LIB_EDIT_FRAME::~LIB_EDIT_FRAME()
delete
m_tempCopyComponent
;
delete
m_tempCopyComponent
;
delete
m_my_part
;
delete
m_my_part
;
m_my_part
=
NULL
;
m_tempCopyComponent
=
NULL
;
}
}
const
wxChar
*
LIB_EDIT_FRAME
::
GetLibEditFrameName
()
const
wxChar
*
LIB_EDIT_FRAME
::
GetLibEditFrameName
()
...
...
eeschema/schedit.cpp
View file @
82dff765
...
@@ -973,7 +973,13 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent )
...
@@ -973,7 +973,13 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent )
EditImage
(
(
SCH_BITMAP
*
)
item
);
EditImage
(
(
SCH_BITMAP
*
)
item
);
break
;
break
;
default
:
case
SCH_LINE_T
:
// These items have no param to edit
case
SCH_MARKER_T
:
case
SCH_JUNCTION_T
:
case
SCH_NO_CONNECT_T
:
break
;
default
:
// Unexpected item
wxFAIL_MSG
(
wxString
::
Format
(
wxT
(
"Cannot edit schematic item type %s."
),
wxFAIL_MSG
(
wxString
::
Format
(
wxT
(
"Cannot edit schematic item type %s."
),
GetChars
(
item
->
GetClass
()
)
)
);
GetChars
(
item
->
GetClass
()
)
)
);
}
}
...
...
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