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
cdd60c95
Commit
cdd60c95
authored
May 23, 2012
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Libedit: fix minor bug: Copy doc not working in Properties dialog.
parent
aac10106
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3673 additions
and
3671 deletions
+3673
-3671
dialog_edit_component_in_lib.cpp
eeschema/dialogs/dialog_edit_component_in_lib.cpp
+9
-7
dialog_edit_component_in_lib.h
eeschema/dialogs/dialog_edit_component_in_lib.h
+1
-1
dialog_edit_component_in_lib_base.cpp
eeschema/dialogs/dialog_edit_component_in_lib_base.cpp
+286
-286
dialog_edit_component_in_lib_base.fbp
eeschema/dialogs/dialog_edit_component_in_lib_base.fbp
+3262
-3262
dialog_edit_component_in_lib_base.h
eeschema/dialogs/dialog_edit_component_in_lib_base.h
+115
-115
No files found.
eeschema/dialogs/dialog_edit_component_in_lib.cpp
View file @
cdd60c95
...
...
@@ -236,25 +236,27 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event )
}
void
DIALOG_EDIT_COMPONENT_IN_LIBRARY
::
CopyDocToAlias
(
wxCommandEvent
&
event
)
void
DIALOG_EDIT_COMPONENT_IN_LIBRARY
::
CopyDoc
FromRoot
ToAlias
(
wxCommandEvent
&
event
)
{
if
(
m_Parent
==
NULL
)
return
;
LIB_ALIAS
*
alias
;
LIB_ALIAS
*
parent_
alias
;
LIB_COMPONENT
*
component
=
m_Parent
->
GetComponent
();
if
(
component
==
NULL
)
return
;
alias
=
component
->
GetAlias
(
m_Parent
->
GetAliasName
()
);
// search for the main alias: this is the first alias in alias list
// something like the main component
parent_alias
=
component
->
GetAlias
(
0
);
if
(
alias
==
NULL
)
if
(
parent_alias
==
NULL
)
// Should never occur (bug
)
return
;
m_DocCtrl
->
SetValue
(
alias
->
GetDescription
()
);
m_DocfileCtrl
->
SetValue
(
alias
->
GetDocFileName
()
);
m_KeywordsCtrl
->
SetValue
(
alias
->
GetKeyWords
()
);
m_DocCtrl
->
SetValue
(
parent_
alias
->
GetDescription
()
);
m_DocfileCtrl
->
SetValue
(
parent_
alias
->
GetDocFileName
()
);
m_KeywordsCtrl
->
SetValue
(
parent_
alias
->
GetKeyWords
()
);
}
...
...
eeschema/dialogs/dialog_edit_component_in_lib.h
View file @
cdd60c95
...
...
@@ -34,7 +34,7 @@ private:
void
AddAliasOfPart
(
wxCommandEvent
&
event
);
bool
ChangeNbUnitsPerPackage
(
int
newUnit
);
bool
SetUnsetConvert
();
void
CopyDocToAlias
(
wxCommandEvent
&
event
);
void
CopyDoc
FromRoot
ToAlias
(
wxCommandEvent
&
event
);
void
BrowseAndSelectDocFile
(
wxCommandEvent
&
event
);
void
DeleteAllFootprintFilter
(
wxCommandEvent
&
event
);
...
...
eeschema/dialogs/dialog_edit_component_in_lib_base.cpp
View file @
cdd60c95
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 1
1 2012)
// C++ code generated with wxFormBuilder (version Apr 1
0 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -109,7 +109,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_PanelBasic
->
SetSizer
(
bSizerBasicPanel
);
m_PanelBasic
->
Layout
();
bSizerBasicPanel
->
Fit
(
m_PanelBasic
);
m_NoteBook
->
AddPage
(
m_PanelBasic
,
_
(
"Options"
),
true
);
m_NoteBook
->
AddPage
(
m_PanelBasic
,
_
(
"Options"
),
false
);
m_PanelDoc
=
new
wxPanel
(
m_NoteBook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxSUNKEN_BORDER
|
wxTAB_TRAVERSAL
);
wxBoxSizer
*
m_PanelDocBoxSizer
;
m_PanelDocBoxSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
...
...
@@ -144,7 +144,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
wxBoxSizer
*
bSizerPaneldocbutts
;
bSizerPaneldocbutts
=
new
wxBoxSizer
(
wxHORIZONTAL
);
m_ButtonCopyDoc
=
new
wxButton
(
m_PanelDoc
,
ID_COPY_DOC_TO_ALIAS
,
_
(
"Copy Doc
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_ButtonCopyDoc
=
new
wxButton
(
m_PanelDoc
,
ID_COPY_DOC_TO_ALIAS
,
_
(
"Copy Doc
from Parent"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizerPaneldocbutts
->
Add
(
m_ButtonCopyDoc
,
0
,
wxALL
,
5
);
m_buttonBrowseDocFiles
=
new
wxButton
(
m_PanelDoc
,
ID_BROWSE_DOC_FILES
,
_
(
"Browse DocFiles"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
...
@@ -157,7 +157,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_PanelDoc
->
SetSizer
(
m_PanelDocBoxSizer
);
m_PanelDoc
->
Layout
();
m_PanelDocBoxSizer
->
Fit
(
m_PanelDoc
);
m_NoteBook
->
AddPage
(
m_PanelDoc
,
_
(
"Description"
),
false
);
m_NoteBook
->
AddPage
(
m_PanelDoc
,
_
(
"Description"
),
true
);
m_PanelAlias
=
new
wxPanel
(
m_NoteBook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxSUNKEN_BORDER
|
wxTAB_TRAVERSAL
);
wxBoxSizer
*
bSizerMainPanelAlias
;
bSizerMainPanelAlias
=
new
wxBoxSizer
(
wxHORIZONTAL
);
...
...
@@ -257,7 +257,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
bMainSizer
->
Fit
(
this
);
// Connect Events
m_ButtonCopyDoc
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
CopyDoc
ToAlias
),
NULL
,
this
);
m_ButtonCopyDoc
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
CopyDoc
FromRootToAlias
),
NULL
,
this
);
m_buttonBrowseDocFiles
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
BrowseAndSelectDocFile
),
NULL
,
this
);
m_ButtonAddeAlias
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
AddAliasOfPart
),
NULL
,
this
);
m_ButtonDeleteOneAlias
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
DeleteAliasOfPart
),
NULL
,
this
);
...
...
@@ -272,7 +272,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::~
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
()
{
// Disconnect Events
m_ButtonCopyDoc
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
CopyDoc
ToAlias
),
NULL
,
this
);
m_ButtonCopyDoc
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
CopyDoc
FromRootToAlias
),
NULL
,
this
);
m_buttonBrowseDocFiles
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
BrowseAndSelectDocFile
),
NULL
,
this
);
m_ButtonAddeAlias
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
AddAliasOfPart
),
NULL
,
this
);
m_ButtonDeleteOneAlias
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE
::
DeleteAliasOfPart
),
NULL
,
this
);
...
...
eeschema/dialogs/dialog_edit_component_in_lib_base.fbp
View file @
cdd60c95
...
...
@@ -185,7 +185,7 @@
<object
class=
"notebookpage"
expanded=
"1"
>
<property
name=
"bitmap"
></property>
<property
name=
"label"
>
Options
</property>
<property
name=
"select"
>
1
</property>
<property
name=
"select"
>
0
</property>
<object
class=
"wxPanel"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
...
...
@@ -1348,7 +1348,7 @@
<object
class=
"notebookpage"
expanded=
"1"
>
<property
name=
"bitmap"
></property>
<property
name=
"label"
>
Description
</property>
<property
name=
"select"
>
0
</property>
<property
name=
"select"
>
1
</property>
<object
class=
"wxPanel"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
...
...
@@ -1992,7 +1992,7 @@
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
ID_COPY_DOC_TO_ALIAS
</property>
<property
name=
"label"
>
Copy Doc
</property>
<property
name=
"label"
>
Copy Doc
from Parent
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
...
...
@@ -2021,7 +2021,7 @@
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<event
name=
"OnButtonClick"
>
CopyDoc
ToAlias
</event>
<event
name=
"OnButtonClick"
>
CopyDoc
FromRootToAlias
</event>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
...
...
eeschema/dialogs/dialog_edit_component_in_lib_base.h
View file @
cdd60c95
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 1
1 2012)
// C++ code generated with wxFormBuilder (version Apr 1
0 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -93,7 +93,7 @@ class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public DIALOG_SHIM
wxButton
*
m_stdSizerButtonCancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
CopyDoc
ToAlias
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
CopyDoc
FromRootToAlias
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
BrowseAndSelectDocFile
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
AddAliasOfPart
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
DeleteAliasOfPart
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
...
...
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