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
72605c34
Commit
72605c34
authored
Feb 10, 2012
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modview: fix minor issues.
parent
623ae37f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
modview.cpp
pcbnew/modview.cpp
+5
-4
modview_frame.cpp
pcbnew/modview_frame.cpp
+28
-10
modview_frame.h
pcbnew/modview_frame.h
+3
-1
No files found.
pcbnew/modview.cpp
View file @
72605c34
...
@@ -109,7 +109,6 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
...
@@ -109,7 +109,6 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
*/
*/
void
FOOTPRINT_VIEWER_FRAME
::
SelectCurrentFootprint
(
wxCommandEvent
&
event
)
void
FOOTPRINT_VIEWER_FRAME
::
SelectCurrentFootprint
(
wxCommandEvent
&
event
)
{
{
wxString
libname
=
m_libraryName
+
wxT
(
"."
)
+
ModuleFileExtension
;
wxString
libname
=
m_libraryName
+
wxT
(
"."
)
+
ModuleFileExtension
;
MODULE
*
oldmodule
=
GetBoard
()
->
m_Modules
;
MODULE
*
oldmodule
=
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
Load_Module_From_Library
(
libname
,
false
);
MODULE
*
module
=
Load_Module_From_Library
(
libname
,
false
);
...
@@ -126,10 +125,12 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event )
...
@@ -126,10 +125,12 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event )
m_footprintName
=
module
->
GetLibRef
();
m_footprintName
=
module
->
GetLibRef
();
module
->
ClearFlags
();
module
->
ClearFlags
();
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
}
Zoom_Automatique
(
false
);
Zoom_Automatique
(
false
);
m_canvas
->
Refresh
(
);
m_canvas
->
Refresh
(
);
Update3D_Frame
();
m_FootprintList
->
SetStringSelection
(
m_footprintName
);
}
}
}
...
...
pcbnew/modview_frame.cpp
View file @
72605c34
...
@@ -512,12 +512,26 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
...
@@ -512,12 +512,26 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
EDA_DRAW_FRAME
::
OnActivate
(
event
);
EDA_DRAW_FRAME
::
OnActivate
(
event
);
// Ensure we do not have old selection:
// Ensure we do not have old selection:
if
(
m_FrameIsActive
)
if
(
!
m_FrameIsActive
)
return
;
m_selectedFootprintName
.
Empty
();
m_selectedFootprintName
.
Empty
();
if
(
m_LibList
)
// Ensure we have the right library list:
ReCreateLibraryList
();
if
(
g_LibraryNames
.
GetCount
()
==
m_LibList
->
GetCount
()
)
{
unsigned
ii
;
for
(
ii
=
0
;
ii
<
g_LibraryNames
.
GetCount
();
ii
++
)
{
if
(
m_LibList
->
GetString
(
ii
)
!=
g_LibraryNames
[
ii
]
)
break
;
}
if
(
ii
==
g_LibraryNames
.
GetCount
()
)
return
;
}
// If we are here, the library list has changed, rebuild it
ReCreateLibraryList
();
DisplayLibInfos
();
DisplayLibInfos
();
}
}
...
@@ -631,7 +645,7 @@ void FOOTPRINT_VIEWER_FRAME::Show3D_Frame( wxCommandEvent& event )
...
@@ -631,7 +645,7 @@ void FOOTPRINT_VIEWER_FRAME::Show3D_Frame( wxCommandEvent& event )
}
}
m_Draw3DFrame
=
new
EDA_3D_FRAME
(
this
,
wxEmptyString
);
m_Draw3DFrame
=
new
EDA_3D_FRAME
(
this
,
wxEmptyString
);
Update3D_Frame
();
Update3D_Frame
(
false
);
m_Draw3DFrame
->
Show
(
true
);
m_Draw3DFrame
->
Show
(
true
);
}
}
...
@@ -640,7 +654,7 @@ void FOOTPRINT_VIEWER_FRAME::Show3D_Frame( wxCommandEvent& event )
...
@@ -640,7 +654,7 @@ void FOOTPRINT_VIEWER_FRAME::Show3D_Frame( wxCommandEvent& event )
* must be called after a footprint selection
* must be called after a footprint selection
* Updates the 3D view and 3D frame title.
* Updates the 3D view and 3D frame title.
*/
*/
void
FOOTPRINT_VIEWER_FRAME
::
Update3D_Frame
()
void
FOOTPRINT_VIEWER_FRAME
::
Update3D_Frame
(
bool
aForceReloadFootprint
)
{
{
if
(
m_Draw3DFrame
==
NULL
)
if
(
m_Draw3DFrame
==
NULL
)
return
;
return
;
...
@@ -648,8 +662,12 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame()
...
@@ -648,8 +662,12 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame()
wxString
frm3Dtitle
;
wxString
frm3Dtitle
;
frm3Dtitle
.
Printf
(
_
(
"ModView: 3D Viewer [%s]"
),
GetChars
(
m_footprintName
)
);
frm3Dtitle
.
Printf
(
_
(
"ModView: 3D Viewer [%s]"
),
GetChars
(
m_footprintName
)
);
m_Draw3DFrame
->
SetTitle
(
frm3Dtitle
);
m_Draw3DFrame
->
SetTitle
(
frm3Dtitle
);
if
(
aForceReloadFootprint
)
{
m_Draw3DFrame
->
ReloadRequest
();
m_Draw3DFrame
->
ReloadRequest
();
// Force 3D screen refresh immediately
// Force 3D screen refresh immediately
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
m_Draw3DFrame
->
NewDisplay
();
m_Draw3DFrame
->
NewDisplay
();
}
}
}
pcbnew/modview_frame.h
View file @
72605c34
...
@@ -161,8 +161,10 @@ private:
...
@@ -161,8 +161,10 @@ private:
* Function Update3D_Frame
* Function Update3D_Frame
* must be called after a footprint selection
* must be called after a footprint selection
* Updates the 3D view and 3D frame title.
* Updates the 3D view and 3D frame title.
* @param aForceReloadFootprint = true to reload data (default)
* = false to update title only -(aftre creating the 3D viewer)
*/
*/
void
Update3D_Frame
();
void
Update3D_Frame
(
bool
aForceReloadFootprint
=
true
);
/*
/*
* Virtual functions, not used here, but needed by PCB_BASE_FRAME
* Virtual functions, not used here, but needed by PCB_BASE_FRAME
...
...
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