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
29446320
Commit
29446320
authored
Jan 19, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup and minor fix in viewlib.
parent
a094f7d5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
149 deletions
+84
-149
tool_viewlib.cpp
eeschema/tool_viewlib.cpp
+9
-9
viewlib_frame.cpp
eeschema/viewlib_frame.cpp
+59
-116
viewlib_frame.h
eeschema/viewlib_frame.h
+9
-17
viewlibs.cpp
eeschema/viewlibs.cpp
+7
-7
No files found.
eeschema/tool_viewlib.cpp
View file @
29446320
...
...
@@ -105,10 +105,10 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
m_mainToolBar
->
AddSeparator
();
S
elpartBox
=
new
wxComboBox
(
m_mainToolBar
,
ID_LIBVIEW_SELECT_PART_NUMBER
,
m_s
elpartBox
=
new
wxComboBox
(
m_mainToolBar
,
ID_LIBVIEW_SELECT_PART_NUMBER
,
wxEmptyString
,
wxDefaultPosition
,
wxSize
(
150
,
-
1
),
0
,
NULL
,
wxCB_READONLY
);
m_mainToolBar
->
AddControl
(
S
elpartBox
);
m_mainToolBar
->
AddControl
(
m_s
elpartBox
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_LIBVIEW_VIEWDOC
,
wxEmptyString
,
...
...
@@ -116,7 +116,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
_
(
"View component documents"
)
);
m_mainToolBar
->
EnableTool
(
ID_LIBVIEW_VIEWDOC
,
false
);
if
(
m_
S
emaphore
)
if
(
m_
s
emaphore
)
{
// The library browser is called from a "load component" command
m_mainToolBar
->
AddSeparator
();
...
...
@@ -167,17 +167,17 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
if
(
component
)
parts_count
=
std
::
max
(
component
->
GetPartCount
(),
1
);
S
elpartBox
->
Clear
();
m_s
elpartBox
->
Clear
();
for
(
ii
=
0
;
ii
<
parts_count
;
ii
++
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Unit %c"
),
'A'
+
ii
);
S
elpartBox
->
Append
(
msg
);
m_s
elpartBox
->
Append
(
msg
);
}
S
elpartBox
->
SetSelection
(
(
m_unit
>
0
)
?
m_unit
-
1
:
0
);
S
elpartBox
->
Enable
(
parts_count
>
1
);
m_s
elpartBox
->
SetSelection
(
(
m_unit
>
0
)
?
m_unit
-
1
:
0
);
m_s
elpartBox
->
Enable
(
parts_count
>
1
);
m_mainToolBar
->
EnableTool
(
ID_LIBVIEW_VIEWDOC
,
entry
&&
(
entry
->
GetDocFileName
()
!=
wxEmptyString
)
);
...
...
eeschema/viewlib_frame.cpp
View file @
29446320
...
...
@@ -60,10 +60,6 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME )
EVT_SIZE
(
LIB_VIEW_FRAME
::
OnSize
)
EVT_ACTIVATE
(
LIB_VIEW_FRAME
::
OnActivate
)
/* Sash drag events */
EVT_SASH_DRAGGED
(
ID_LIBVIEW_LIBWINDOW
,
LIB_VIEW_FRAME
::
OnSashDrag
)
EVT_SASH_DRAGGED
(
ID_LIBVIEW_CMPWINDOW
,
LIB_VIEW_FRAME
::
OnSashDrag
)
/* Toolbar events */
EVT_TOOL_RANGE
(
ID_LIBVIEW_NEXT
,
ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT
,
LIB_VIEW_FRAME
::
Process_Special_Functions
)
...
...
@@ -96,8 +92,6 @@ static wxAcceleratorEntry accels[] =
};
#define ACCEL_TABLE_CNT ( sizeof( accels ) / sizeof( wxAcceleratorEntry ) )
#define EXTRA_BORDER_SIZE 2
#define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" )
LIB_VIEW_FRAME
::
LIB_VIEW_FRAME
(
SCH_BASE_FRAME
*
aParent
,
CMP_LIBRARY
*
aLibrary
,
...
...
@@ -117,13 +111,13 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary,
SetIcon
(
icon
);
m_HotkeysZoomAndGridList
=
s_Viewlib_Hokeys_Descr
;
m_CmpList
=
NULL
;
m_LibList
=
NULL
;
m_LibListWindow
=
NULL
;
m_CmpListWindow
=
NULL
;
m_Semaphore
=
aSemaphore
;
if
(
m_Semaphore
)
m_cmpList
=
NULL
;
m_libList
=
NULL
;
m_semaphore
=
aSemaphore
;
if
(
m_semaphore
)
SetModalMode
(
true
);
m_exportToEeschemaCmpName
.
Empty
();
SetScreen
(
new
SCH_SCREEN
()
);
...
...
@@ -142,23 +136,13 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary,
wxSize
size
=
GetClientSize
();
size
.
y
-=
m_MsgFrameHeight
+
2
;
m_LibListSize
.
y
=
-
1
;
wxPoint
win_pos
(
0
,
0
);
if
(
aLibrary
==
NULL
)
{
// Creates the libraries window display
m_LibListWindow
=
new
wxSashLayoutWindow
(
this
,
ID_LIBVIEW_LIBWINDOW
,
win_pos
,
wxDefaultSize
,
wxCLIP_CHILDREN
|
wxSW_3D
,
wxT
(
"LibWindow"
)
);
m_LibListWindow
->
SetOrientation
(
wxLAYOUT_VERTICAL
);
m_LibListWindow
->
SetAlignment
(
wxLAYOUT_LEFT
);
m_LibListWindow
->
SetSashVisible
(
wxSASH_RIGHT
,
true
);
m_LibListWindow
->
SetExtraBorderSize
(
EXTRA_BORDER_SIZE
);
m_LibList
=
new
wxListBox
(
m_LibListWindow
,
ID_LIBVIEW_LIB_LIST
,
wxPoint
(
0
,
0
),
wxDefaultSize
,
m_libList
=
new
wxListBox
(
this
,
ID_LIBVIEW_LIB_LIST
,
wxPoint
(
0
,
0
),
wxSize
(
m_libListWidth
,
-
1
),
0
,
NULL
,
wxLB_HSCROLL
);
}
else
...
...
@@ -167,25 +151,16 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary,
m_entryName
.
Clear
();
m_unit
=
1
;
m_convert
=
1
;
m_
LibListSize
.
x
=
0
;
m_
libListWidth
=
0
;
}
// Creates the component window display
m_CmpListSize
.
y
=
size
.
y
;
win_pos
.
x
=
m_LibListSize
.
x
;
m_CmpListWindow
=
new
wxSashLayoutWindow
(
this
,
ID_LIBVIEW_CMPWINDOW
,
win_pos
,
wxDefaultSize
,
wxCLIP_CHILDREN
|
wxSW_3D
,
wxT
(
"CmpWindow"
)
);
m_CmpListWindow
->
SetOrientation
(
wxLAYOUT_VERTICAL
);
m_CmpListWindow
->
SetSashVisible
(
wxSASH_RIGHT
,
true
);
m_CmpListWindow
->
SetExtraBorderSize
(
EXTRA_BORDER_SIZE
);
m_CmpList
=
new
wxListBox
(
m_CmpListWindow
,
ID_LIBVIEW_CMP_LIST
,
wxPoint
(
0
,
0
),
wxDefaultSize
,
win_pos
.
x
=
m_libListWidth
;
m_cmpList
=
new
wxListBox
(
this
,
ID_LIBVIEW_CMP_LIST
,
wxPoint
(
0
,
0
),
wxSize
(
m_cmpListWidth
,
-
1
),
0
,
NULL
,
wxLB_HSCROLL
);
if
(
m_
L
ibList
)
if
(
m_
l
ibList
)
ReCreateListLib
();
DisplayLibInfos
();
...
...
@@ -213,16 +188,14 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary,
m_auimgr
.
AddPane
(
m_mainToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_mainToolBar"
)
).
Top
().
Row
(
0
)
);
wxSize
minsize
(
60
,
-
1
);
// Manage the left window (list of libraries)
if
(
m_
LibListWindow
)
m_auimgr
.
AddPane
(
m_
LibListWindow
,
wxAuiPaneInfo
(
info
).
Name
(
wxT
(
"m_L
ibList"
)
).
Left
().
Row
(
0
));
if
(
m_
libList
)
m_auimgr
.
AddPane
(
m_
libList
,
wxAuiPaneInfo
(
info
).
Name
(
wxT
(
"m_l
ibList"
)
).
Left
().
Row
(
0
)
);
// Manage the list of components)
m_auimgr
.
AddPane
(
m_
CmpListWindow
,
wxAuiPaneInfo
(
info
).
Name
(
wxT
(
"m_
C
mpList"
)
).
m_auimgr
.
AddPane
(
m_
cmpList
,
wxAuiPaneInfo
(
info
).
Name
(
wxT
(
"m_
c
mpList"
)
).
Left
().
Row
(
1
)
);
// Manage the draw panel
...
...
@@ -236,13 +209,14 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary,
/* Now the minimum windows are fixed, set library list
* and component list of the previous values from last viewlib use
*/
if
(
m_
LibListWindow
)
if
(
m_
libList
)
{
wxAuiPaneInfo
&
pane
=
m_auimgr
.
GetPane
(
m_LibListWindow
);
pane
.
MinSize
(
wxSize
(
m_LibListSize
.
x
,
-
1
)
);
m_auimgr
.
GetPane
(
m_libList
).
MinSize
(
wxSize
(
80
,
-
1
)
);
m_auimgr
.
GetPane
(
m_libList
).
BestSize
(
wxSize
(
m_libListWidth
,
-
1
)
);
}
wxAuiPaneInfo
&
pane
=
m_auimgr
.
GetPane
(
m_CmpListWindow
);
pane
.
MinSize
(
wxSize
(
m_CmpListSize
.
x
,
-
1
));
m_auimgr
.
GetPane
(
m_cmpList
).
MinSize
(
wxSize
(
80
,
-
1
)
);
m_auimgr
.
GetPane
(
m_cmpList
).
BestSize
(
wxSize
(
m_cmpListWidth
,
-
1
)
);
m_auimgr
.
Update
();
...
...
@@ -278,9 +252,9 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
SaveSettings
();
if
(
m_
S
emaphore
)
if
(
m_
s
emaphore
)
{
m_
S
emaphore
->
Post
();
m_
s
emaphore
->
Post
();
// This window will be destroyed by the calling function,
// if needed
SetModalMode
(
false
);
...
...
@@ -292,38 +266,6 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
}
void
LIB_VIEW_FRAME
::
OnSashDrag
(
wxSashEvent
&
event
)
{
if
(
event
.
GetDragStatus
()
==
wxSASH_STATUS_OUT_OF_RANGE
)
return
;
m_LibListSize
.
y
=
GetClientSize
().
y
-
m_MsgFrameHeight
;
m_CmpListSize
.
y
=
m_LibListSize
.
y
;
switch
(
event
.
GetId
()
)
{
case
ID_LIBVIEW_LIBWINDOW
:
if
(
m_LibListWindow
)
{
wxAuiPaneInfo
&
pane
=
m_auimgr
.
GetPane
(
m_LibListWindow
);
m_LibListSize
.
x
=
event
.
GetDragRect
().
width
;
pane
.
MinSize
(
m_LibListSize
);
m_auimgr
.
Update
();
}
break
;
case
ID_LIBVIEW_CMPWINDOW
:
{
wxAuiPaneInfo
&
pane
=
m_auimgr
.
GetPane
(
m_CmpListWindow
);
m_CmpListSize
.
x
=
event
.
GetDragRect
().
width
;
pane
.
MinSize
(
m_CmpListSize
);
m_auimgr
.
Update
();
}
break
;
}
}
void
LIB_VIEW_FRAME
::
OnSize
(
wxSizeEvent
&
SizeEv
)
{
if
(
m_auimgr
.
GetManagedWindow
()
)
...
...
@@ -388,18 +330,18 @@ double LIB_VIEW_FRAME::BestZoom()
void
LIB_VIEW_FRAME
::
ReCreateListLib
()
{
if
(
m_
L
ibList
==
NULL
)
if
(
m_
l
ibList
==
NULL
)
return
;
m_
L
ibList
->
Clear
();
m_
L
ibList
->
Append
(
CMP_LIBRARY
::
GetLibraryNames
()
);
m_
l
ibList
->
Clear
();
m_
l
ibList
->
Append
(
CMP_LIBRARY
::
GetLibraryNames
()
);
// Search for a previous selection:
int
index
=
m_L
ibList
->
FindString
(
m_libraryName
);
int
index
=
m_l
ibList
->
FindString
(
m_libraryName
);
if
(
index
!=
wxNOT_FOUND
)
{
m_
L
ibList
->
SetSelection
(
index
,
true
);
m_
l
ibList
->
SetSelection
(
index
,
true
);
}
else
{
...
...
@@ -420,10 +362,10 @@ void LIB_VIEW_FRAME::ReCreateListLib()
void
LIB_VIEW_FRAME
::
ReCreateListCmp
()
{
if
(
m_
C
mpList
==
NULL
)
if
(
m_
c
mpList
==
NULL
)
return
;
m_
C
mpList
->
Clear
();
m_
c
mpList
->
Clear
();
CMP_LIBRARY
*
Library
=
CMP_LIBRARY
::
FindLibrary
(
m_libraryName
);
...
...
@@ -438,9 +380,9 @@ void LIB_VIEW_FRAME::ReCreateListCmp()
wxArrayString
nameList
;
Library
->
GetEntryNames
(
nameList
);
m_
C
mpList
->
Append
(
nameList
);
m_
c
mpList
->
Append
(
nameList
);
int
index
=
m_
C
mpList
->
FindString
(
m_entryName
);
int
index
=
m_
c
mpList
->
FindString
(
m_entryName
);
if
(
index
==
wxNOT_FOUND
)
{
...
...
@@ -450,19 +392,19 @@ void LIB_VIEW_FRAME::ReCreateListCmp()
}
else
{
m_
C
mpList
->
SetSelection
(
index
,
true
);
m_
c
mpList
->
SetSelection
(
index
,
true
);
}
}
void
LIB_VIEW_FRAME
::
ClickOnLibList
(
wxCommandEvent
&
event
)
{
int
ii
=
m_
L
ibList
->
GetSelection
();
int
ii
=
m_
l
ibList
->
GetSelection
();
if
(
ii
<
0
)
return
;
wxString
name
=
m_
L
ibList
->
GetString
(
ii
);
wxString
name
=
m_
l
ibList
->
GetString
(
ii
);
if
(
m_libraryName
==
name
)
return
;
...
...
@@ -477,12 +419,12 @@ void LIB_VIEW_FRAME::ClickOnLibList( wxCommandEvent& event )
void
LIB_VIEW_FRAME
::
ClickOnCmpList
(
wxCommandEvent
&
event
)
{
int
ii
=
m_
C
mpList
->
GetSelection
();
int
ii
=
m_
c
mpList
->
GetSelection
();
if
(
ii
<
0
)
return
;
wxString
name
=
m_
C
mpList
->
GetString
(
ii
);
wxString
name
=
m_
c
mpList
->
GetString
(
ii
);
if
(
m_entryName
.
CmpNoCase
(
name
)
!=
0
)
{
...
...
@@ -498,7 +440,7 @@ void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event )
void
LIB_VIEW_FRAME
::
DClickOnCmpList
(
wxCommandEvent
&
event
)
{
if
(
m_
S
emaphore
)
if
(
m_
s
emaphore
)
{
ExportToSchematicLibraryPart
(
event
);
...
...
@@ -512,10 +454,10 @@ void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event )
void
LIB_VIEW_FRAME
::
ExportToSchematicLibraryPart
(
wxCommandEvent
&
event
)
{
int
ii
=
m_
C
mpList
->
GetSelection
();
int
ii
=
m_
c
mpList
->
GetSelection
();
if
(
ii
>=
0
)
m_exportToEeschemaCmpName
=
m_
C
mpList
->
GetString
(
ii
);
m_exportToEeschemaCmpName
=
m_
c
mpList
->
GetString
(
ii
);
else
m_exportToEeschemaCmpName
.
Empty
();
...
...
@@ -523,8 +465,8 @@ void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event )
}
#define LIBLIST_WIDTH_KEY wxT( "
Liblist_w
idth" )
#define CMPLIST_WIDTH_KEY wxT( "
Cmplist_w
idth" )
#define LIBLIST_WIDTH_KEY wxT( "
ViewLiblistW
idth" )
#define CMPLIST_WIDTH_KEY wxT( "
ViewCmplistW
idth" )
void
LIB_VIEW_FRAME
::
LoadSettings
(
)
...
...
@@ -536,18 +478,15 @@ void LIB_VIEW_FRAME::LoadSettings( )
wxConfigPathChanger
cpc
(
wxGetApp
().
GetSettings
(),
m_configPath
);
cfg
=
wxGetApp
().
GetSettings
();
m_LibListSize
.
x
=
150
;
// default width of libs list
m_CmpListSize
.
x
=
150
;
// default width of component list
cfg
->
Read
(
LIBLIST_WIDTH_KEY
,
&
m_LibListSize
.
x
);
cfg
->
Read
(
CMPLIST_WIDTH_KEY
,
&
m_CmpListSize
.
x
);
cfg
->
Read
(
LIBLIST_WIDTH_KEY
,
&
m_libListWidth
,
100
);
cfg
->
Read
(
CMPLIST_WIDTH_KEY
,
&
m_cmpListWidth
,
100
);
// Set parameters to a reasonable value.
if
(
m_
LibListSize
.
x
>
m_FrameSize
.
x
/
2
)
m_
LibListSize
.
x
=
m_FrameSize
.
x
/
2
;
if
(
m_
libListWidth
>
m_FrameSize
.
x
/
2
)
m_
libListWidth
=
m_FrameSize
.
x
/
2
;
if
(
m_
CmpListSize
.
x
>
m_FrameSize
.
x
/
2
)
m_
CmpListSize
.
x
=
m_FrameSize
.
x
/
2
;
if
(
m_
cmpListWidth
>
m_FrameSize
.
x
/
2
)
m_
cmpListWidth
=
m_FrameSize
.
x
/
2
;
}
...
...
@@ -560,10 +499,14 @@ void LIB_VIEW_FRAME::SaveSettings()
wxConfigPathChanger
cpc
(
wxGetApp
().
GetSettings
(),
m_configPath
);
cfg
=
wxGetApp
().
GetSettings
();
if
(
m_LibListSize
.
x
)
cfg
->
Write
(
LIBLIST_WIDTH_KEY
,
m_LibListSize
.
x
);
if
(
m_libListWidth
&&
m_libList
)
{
m_libListWidth
=
m_libList
->
GetSize
().
x
;
cfg
->
Write
(
LIBLIST_WIDTH_KEY
,
m_libListWidth
);
}
cfg
->
Write
(
CMPLIST_WIDTH_KEY
,
m_CmpListSize
.
x
);
m_cmpListWidth
=
m_cmpList
->
GetSize
().
x
;
cfg
->
Write
(
CMPLIST_WIDTH_KEY
,
m_cmpListWidth
);
}
...
...
@@ -575,7 +518,7 @@ void LIB_VIEW_FRAME::OnActivate( wxActivateEvent& event )
if
(
m_FrameIsActive
)
m_exportToEeschemaCmpName
.
Empty
();
if
(
m_
L
ibList
)
if
(
m_
l
ibList
)
ReCreateListLib
();
DisplayLibInfos
();
...
...
eeschema/viewlib_frame.h
View file @
29446320
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20
04 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2008-201
1
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 20
14 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-201
4
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
4
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -48,20 +48,18 @@ class CMP_LIBRARY;
class
LIB_VIEW_FRAME
:
public
SCH_BASE_FRAME
{
private
:
wxComboBox
*
S
elpartBox
;
wxComboBox
*
m_s
elpartBox
;
// List of libraries (for selection )
wxSashLayoutWindow
*
m_LibListWindow
;
wxListBox
*
m_LibList
;
// The list of libs
wxSize
m_LibListSize
;
// size of the window
wxListBox
*
m_libList
;
// The list of libs
int
m_libListWidth
;
// Last width of the window
// List of components in the selected library
wxSashLayoutWindow
*
m_CmpListWindow
;
wxListBox
*
m_CmpList
;
// The list of components
wxSize
m_CmpListSize
;
// size of the window
wxListBox
*
m_cmpList
;
// The list of components
int
m_cmpListWidth
;
// Last width of the window
// Flags
wxSemaphore
*
m_
S
emaphore
;
// != NULL if the frame must emulate a modal dialog
wxSemaphore
*
m_
s
emaphore
;
// != NULL if the frame must emulate a modal dialog
wxString
m_configPath
;
// subpath for configuration
protected
:
...
...
@@ -95,12 +93,6 @@ public:
void
OnSize
(
wxSizeEvent
&
event
);
/**
* Function OnSashDrag
* resizes the child windows when dragging a sash window border.
*/
void
OnSashDrag
(
wxSashEvent
&
event
);
/**
* Function ReCreateListLib
*
...
...
eeschema/viewlibs.cpp
View file @
29446320
...
...
@@ -70,7 +70,7 @@ void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_LIBVIEW_SELECT_PART_NUMBER
:
ii
=
S
elpartBox
->
GetCurrentSelection
();
ii
=
m_s
elpartBox
->
GetCurrentSelection
();
if
(
ii
<
0
)
return
;
m_unit
=
ii
+
1
;
...
...
@@ -132,16 +132,16 @@ void LIB_VIEW_FRAME::SelectCurrentLibrary()
m_libraryName
=
Lib
->
GetName
();
DisplayLibInfos
();
if
(
m_
L
ibList
)
if
(
m_
l
ibList
)
{
ReCreateListCmp
();
m_canvas
->
Refresh
();
DisplayLibInfos
();
ReCreateHToolbar
();
int
id
=
m_
L
ibList
->
FindString
(
m_libraryName
.
GetData
()
);
int
id
=
m_
l
ibList
->
FindString
(
m_libraryName
.
GetData
()
);
if
(
id
>=
0
)
m_
L
ibList
->
SetSelection
(
id
);
m_
l
ibList
->
SetSelection
(
id
);
}
}
}
...
...
@@ -234,11 +234,11 @@ void LIB_VIEW_FRAME::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag )
Zoom_Automatique
(
false
);
m_canvas
->
Refresh
(
);
if
(
m_
C
mpList
)
if
(
m_
c
mpList
)
{
int
id
=
m_
C
mpList
->
FindString
(
m_entryName
.
GetData
()
);
int
id
=
m_
c
mpList
->
FindString
(
m_entryName
.
GetData
()
);
if
(
id
>=
0
)
m_
C
mpList
->
SetSelection
(
id
);
m_
c
mpList
->
SetSelection
(
id
);
}
ReCreateHToolbar
();
}
...
...
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