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
e1431199
Commit
e1431199
authored
May 01, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto update 3D display after footprint or board edition.
parent
a35a0836
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
11 deletions
+72
-11
3d_frame.cpp
3d-viewer/3d_frame.cpp
+6
-4
3d_viewer.h
3d-viewer/3d_viewer.h
+17
-6
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+3
-1
wxPcbStruct.h
include/wxPcbStruct.h
+16
-0
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+2
-0
modedit.cpp
pcbnew/modedit.cpp
+1
-0
moduleframe.cpp
pcbnew/moduleframe.cpp
+13
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+14
-0
No files found.
3d-viewer/3d_frame.cpp
View file @
e1431199
...
@@ -57,6 +57,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent,
...
@@ -57,6 +57,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent,
m_HToolBar
=
NULL
;
m_HToolBar
=
NULL
;
m_VToolBar
=
NULL
;
m_VToolBar
=
NULL
;
m_InternalUnits
=
10000
;
// Internal units = 1/10000 inch
m_InternalUnits
=
10000
;
// Internal units = 1/10000 inch
m_reloadRequest
=
false
;
// Give it an icon
// Give it an icon
SetIcon
(
wxICON
(
icon_w3d
)
);
SetIcon
(
wxICON
(
icon_w3d
)
);
...
@@ -343,6 +344,8 @@ error: unknown command" ) );
...
@@ -343,6 +344,8 @@ error: unknown command" ) );
void
WinEDA3D_DrawFrame
::
NewDisplay
()
void
WinEDA3D_DrawFrame
::
NewDisplay
()
{
{
m_reloadRequest
=
false
;
m_Canvas
->
ClearLists
();
m_Canvas
->
ClearLists
();
m_Canvas
->
CreateDrawGL_List
();
m_Canvas
->
CreateDrawGL_List
();
...
@@ -356,10 +359,9 @@ void WinEDA3D_DrawFrame::OnActivate( wxActivateEvent& event )
...
@@ -356,10 +359,9 @@ void WinEDA3D_DrawFrame::OnActivate( wxActivateEvent& event )
{
{
// Reload data if 3D frame shows a footprint,
// Reload data if 3D frame shows a footprint,
// because it can be changed since last frame activation
// because it can be changed since last frame activation
if
(
m_Parent
->
m_Ident
==
MODULE_EDITOR_FRAME
)
if
(
m_reloadRequest
)
{
NewDisplay
();
// NewDisplay();
}
event
.
Skip
();
// required under wxMAC
event
.
Skip
();
// required under wxMAC
}
}
...
...
3d-viewer/3d_viewer.h
View file @
e1431199
...
@@ -185,23 +185,25 @@ class WinEDA3D_DrawFrame : public wxFrame
...
@@ -185,23 +185,25 @@ class WinEDA3D_DrawFrame : public wxFrame
{
{
public
:
public
:
WinEDA_BasePcbFrame
*
m_Parent
;
WinEDA_BasePcbFrame
*
m_Parent
;
private
:
wxString
m_FrameName
;
// name used for writing and reading setup
// It is "Frame3D"
Pcb3D_GLCanvas
*
m_Canvas
;
Pcb3D_GLCanvas
*
m_Canvas
;
WinEDA_Toolbar
*
m_HToolBar
;
WinEDA_Toolbar
*
m_HToolBar
;
WinEDA_Toolbar
*
m_VToolBar
;
WinEDA_Toolbar
*
m_VToolBar
;
int
m_InternalUnits
;
int
m_InternalUnits
;
wxPoint
m_FramePos
;
wxPoint
m_FramePos
;
wxSize
m_FrameSize
;
wxSize
m_FrameSize
;
wxAuiManager
m_auimgr
;
wxAuiManager
m_auimgr
;
~
WinEDA3D_DrawFrame
()
{
m_auimgr
.
UnInit
();
};
bool
m_reloadRequest
;
private
:
wxString
m_FrameName
;
// name used for writing and reading setup
// It is "Frame3D"
public
:
public
:
WinEDA3D_DrawFrame
(
WinEDA_BasePcbFrame
*
parent
,
const
wxString
&
title
,
WinEDA3D_DrawFrame
(
WinEDA_BasePcbFrame
*
parent
,
const
wxString
&
title
,
long
style
=
KICAD_DEFAULT_3D_DRAWFRAME_STYLE
);
long
style
=
KICAD_DEFAULT_3D_DRAWFRAME_STYLE
);
~
WinEDA3D_DrawFrame
()
{
m_auimgr
.
UnInit
();
};
void
Exit3DFrame
(
wxCommandEvent
&
event
);
void
Exit3DFrame
(
wxCommandEvent
&
event
);
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
...
@@ -211,6 +213,15 @@ public:
...
@@ -211,6 +213,15 @@ public:
void
SetToolbars
();
void
SetToolbars
();
void
GetSettings
();
void
GetSettings
();
void
SaveSettings
();
void
SaveSettings
();
/** function ReloadRequest
* must be called when reloading data from Pcbnew is needed
* mainly after edition of the board or footprint beeing displayed.
* mainly for the mudule editor.
*/
void
ReloadRequest
(
)
{
m_reloadRequest
=
true
;
}
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
void
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
...
...
include/wxBasePcbFrame.h
View file @
e1431199
...
@@ -218,9 +218,11 @@ public:
...
@@ -218,9 +218,11 @@ public:
/** Function OnModify()
/** Function OnModify()
* Virtual
* Virtual
* Must be called after a
schematic
change
* Must be called after a change
* in order to set the "modify" flag of the current screen
* in order to set the "modify" flag of the current screen
* and update the date in frame reference
* and update the date in frame reference
* do not forget to call this basic OnModify function to update info
* in derived OnModify functions
*/
*/
virtual
void
OnModify
(
);
virtual
void
OnModify
(
);
...
...
include/wxPcbStruct.h
View file @
e1431199
...
@@ -274,6 +274,14 @@ public:
...
@@ -274,6 +274,14 @@ public:
void
ReCreateMenuBar
();
void
ReCreateMenuBar
();
WinEDAChoiceBox
*
ReCreateLayerBox
(
WinEDA_Toolbar
*
parent
);
WinEDAChoiceBox
*
ReCreateLayerBox
(
WinEDA_Toolbar
*
parent
);
/** Virtual Function OnModify()
* Must be called after a board change
* in order to set the "modify" flag of the current screen
* and prepare, if needed the refresh of the 3D frame showing the footprint
* do not forget to call the basic OnModify function to update auxiliary info
*/
virtual
void
OnModify
(
);
/**
/**
* Function IsElementVisible
* Function IsElementVisible
* tests whether a given element category is visible. Keep this as an
* tests whether a given element category is visible. Keep this as an
...
@@ -1069,6 +1077,14 @@ public:
...
@@ -1069,6 +1077,14 @@ public:
void
GeneralControle
(
wxDC
*
DC
,
wxPoint
Mouse
);
void
GeneralControle
(
wxDC
*
DC
,
wxPoint
Mouse
);
void
LoadModuleFromBoard
(
wxCommandEvent
&
event
);
void
LoadModuleFromBoard
(
wxCommandEvent
&
event
);
/** Virtual Function OnModify()
* Must be called after a footprint change
* in order to set the "modify" flag of the current screen
* and prepare, if needed the refresh of the 3D frame showing the footprint
* do not forget to call the basic OnModify function to update auxiliary info
*/
virtual
void
OnModify
(
);
/** function ToPrinter
/** function ToPrinter
* Install the print dialog
* Install the print dialog
*/
*/
...
...
pcbnew/basepcbframe.cpp
View file @
e1431199
...
@@ -423,6 +423,8 @@ void WinEDA_BasePcbFrame::SaveSettings()
...
@@ -423,6 +423,8 @@ void WinEDA_BasePcbFrame::SaveSettings()
* Must be called after a schematic change
* Must be called after a schematic change
* in order to set the "modify" flag of the current screen
* in order to set the "modify" flag of the current screen
* and update the date in frame reference
* and update the date in frame reference
* do not forget to call this basic OnModify function to update info
* in derived OnModify functions
*/
*/
void
WinEDA_BasePcbFrame
::
OnModify
(
)
void
WinEDA_BasePcbFrame
::
OnModify
(
)
{
{
...
...
pcbnew/modedit.cpp
View file @
e1431199
...
@@ -802,4 +802,5 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, int transform )
...
@@ -802,4 +802,5 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, int transform )
}
}
module
->
Set_Rectangle_Encadrement
();
module
->
Set_Rectangle_Encadrement
();
OnModify
();
}
}
pcbnew/moduleframe.cpp
View file @
e1431199
...
@@ -531,3 +531,16 @@ void WinEDA_ModuleEditFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
...
@@ -531,3 +531,16 @@ void WinEDA_ModuleEditFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
SetToolbars
();
SetToolbars
();
UpdateStatusBar
();
UpdateStatusBar
();
}
}
/** Virtual Function OnModify()
* Must be called after a change
* in order to set the "modify" flag of the current screen
* and prepare, if needed the refresh of the 3D frame showing the footprint
* do not forget to call the basic OnModify function to update auxiliary info
*/
void
WinEDA_ModuleEditFrame
::
OnModify
(
)
{
WinEDA_BasePcbFrame
::
OnModify
(
);
if
(
m_Draw3DFrame
)
m_Draw3DFrame
->
ReloadRequest
(
);
}
pcbnew/pcbframe.cpp
View file @
e1431199
...
@@ -678,3 +678,17 @@ void WinEDA_PcbFrame::SetLastNetListRead( const wxString& aLastNetListRead )
...
@@ -678,3 +678,17 @@ void WinEDA_PcbFrame::SetLastNetListRead( const wxString& aLastNetListRead )
m_lastNetListRead
=
relativeFileName
.
GetFullPath
();
m_lastNetListRead
=
relativeFileName
.
GetFullPath
();
}
}
}
}
/** Virtual Function OnModify()
* Must be called after a change
* in order to set the "modify" flag of the current screen
* and prepare, if needed the refresh of the 3D frame showing the footprint
* do not forget to call the basic OnModify function to update auxiliary info
*/
void
WinEDA_PcbFrame
::
OnModify
(
)
{
WinEDA_BasePcbFrame
::
OnModify
(
);
if
(
m_Draw3DFrame
)
m_Draw3DFrame
->
ReloadRequest
(
);
}
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