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
0b9f39fa
Commit
0b9f39fa
authored
Aug 04, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 3D frame issue when iconized (Windows only).
parent
04bf11c2
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
161 additions
and
160 deletions
+161
-160
GUI_Translation_HOWTO.odt
Documentation/GUI_Translation_HOWTO.odt
+0
-0
GUI_Translation_HOWTO.pdf
Documentation/GUI_Translation_HOWTO.pdf
+0
-0
class_DisplayFootprintsFrame.cpp
cvpcb/class_DisplayFootprintsFrame.cpp
+8
-8
class_footprints_listbox.cpp
cvpcb/class_footprints_listbox.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+101
-112
cvpcb_mainframe.h
cvpcb/cvpcb_mainframe.h
+17
-19
setvisu.cpp
cvpcb/setvisu.cpp
+24
-20
edit.cpp
pcbnew/edit.cpp
+2
-0
moduleframe.cpp
pcbnew/moduleframe.cpp
+4
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+4
-0
No files found.
Documentation/GUI_Translation_HOWTO.odt
View file @
0b9f39fa
No preview for this file type
Documentation/GUI_Translation_HOWTO.pdf
View file @
0b9f39fa
No preview for this file type
cvpcb/class_DisplayFootprintsFrame.cpp
View file @
0b9f39fa
...
@@ -106,7 +106,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
...
@@ -106,7 +106,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)
).
Right
()
);
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)
).
Right
()
);
m_auimgr
.
AddPane
(
DrawPanel
,
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"D
raw
Frame"
)
).
CentrePane
()
);
wxAuiPaneInfo
().
Name
(
wxT
(
"D
isplay
Frame"
)
).
CentrePane
()
);
m_auimgr
.
AddPane
(
MsgPanel
,
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)
).
Bottom
()
);
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)
).
Bottom
()
);
...
@@ -126,7 +126,7 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
...
@@ -126,7 +126,7 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
delete
GetScreen
();
delete
GetScreen
();
SetScreen
(
NULL
);
SetScreen
(
NULL
);
(
(
CVPCB_MAINFRAME
*
)
wxGetApp
().
GetTopWindow
()
)
->
Draw
Frame
=
NULL
;
(
(
CVPCB_MAINFRAME
*
)
wxGetApp
().
GetTopWindow
()
)
->
m_DisplayFootprint
Frame
=
NULL
;
}
}
/* Called when the frame is closed
/* Called when the frame is closed
...
@@ -134,12 +134,8 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
...
@@ -134,12 +134,8 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
*/
*/
void
DISPLAY_FOOTPRINTS_FRAME
::
OnCloseWindow
(
wxCloseEvent
&
event
)
void
DISPLAY_FOOTPRINTS_FRAME
::
OnCloseWindow
(
wxCloseEvent
&
event
)
{
{
wxPoint
pos
;
if
(
m_Draw3DFrame
)
wxSize
size
;
m_Draw3DFrame
->
Close
(
true
);
size
=
GetSize
();
pos
=
GetPosition
();
SaveSettings
();
SaveSettings
();
Destroy
();
Destroy
();
}
}
...
@@ -408,6 +404,10 @@ void DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame( wxCommandEvent& event )
...
@@ -408,6 +404,10 @@ void DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame( wxCommandEvent& event )
{
{
if
(
m_Draw3DFrame
)
if
(
m_Draw3DFrame
)
{
{
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if
(
m_Draw3DFrame
->
IsIconized
()
)
m_Draw3DFrame
->
Iconize
(
false
);
m_Draw3DFrame
->
Raise
();
m_Draw3DFrame
->
Raise
();
// Raising the window does not set the focus on Linux. This should work on any platform.
// Raising the window does not set the focus on Linux. This should work on any platform.
...
...
cvpcb/class_footprints_listbox.cpp
View file @
0b9f39fa
...
@@ -244,7 +244,7 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event )
...
@@ -244,7 +244,7 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event )
Module
=
GetParent
()
->
m_footprints
.
GetModuleInfo
(
FootprintName
);
Module
=
GetParent
()
->
m_footprints
.
GetModuleInfo
(
FootprintName
);
wxASSERT
(
Module
);
wxASSERT
(
Module
);
if
(
GetParent
()
->
Draw
Frame
)
if
(
GetParent
()
->
m_DisplayFootprint
Frame
)
{
{
GetParent
()
->
CreateScreenCmp
();
/* refresh general */
GetParent
()
->
CreateScreenCmp
();
/* refresh general */
}
}
...
...
cvpcb/cvframe.cpp
View file @
0b9f39fa
This diff is collapsed.
Click to expand it.
cvpcb/cvpcb_mainframe.h
View file @
0b9f39fa
...
@@ -17,7 +17,6 @@ class COMPONENTS_LISTBOX;
...
@@ -17,7 +17,6 @@ class COMPONENTS_LISTBOX;
class
DISPLAY_FOOTPRINTS_FRAME
;
class
DISPLAY_FOOTPRINTS_FRAME
;
/**
/**
* The CVPcb application main window.
* The CVPcb application main window.
*/
*/
...
@@ -26,18 +25,18 @@ class CVPCB_MAINFRAME : public EDA_BASE_FRAME
...
@@ -26,18 +25,18 @@ class CVPCB_MAINFRAME : public EDA_BASE_FRAME
public
:
public
:
bool
m_KeepCvpcbOpen
;
bool
m_KeepCvpcbOpen
;
FOOTPRINTS_LISTBOX
*
m_FootprintList
;
FOOTPRINTS_LISTBOX
*
m_FootprintList
;
COMPONENTS_LISTBOX
*
m_ListCmp
;
COMPONENTS_LISTBOX
*
m_ListCmp
;
DISPLAY_FOOTPRINTS_FRAME
*
Draw
Frame
;
DISPLAY_FOOTPRINTS_FRAME
*
m_DisplayFootprint
Frame
;
EDA_TOOLBAR
*
m_HToolBar
;
EDA_TOOLBAR
*
m_HToolBar
;
wxFileName
m_NetlistFileName
;
wxFileName
m_NetlistFileName
;
wxArrayString
m_ModuleLibNames
;
wxArrayString
m_ModuleLibNames
;
wxArrayString
m_AliasLibNames
;
wxArrayString
m_AliasLibNames
;
wxString
m_UserLibraryPath
;
wxString
m_UserLibraryPath
;
wxString
m_NetlistFileExtension
;
wxString
m_NetlistFileExtension
;
wxString
m_DocModulesFileName
;
wxString
m_DocModulesFileName
;
FOOTPRINT_LIST
m_footprints
;
FOOTPRINT_LIST
m_footprints
;
COMPONENT_LIST
m_components
;
COMPONENT_LIST
m_components
;
protected
:
protected
:
int
m_undefinedComponentCnt
;
int
m_undefinedComponentCnt
;
...
@@ -45,9 +44,8 @@ protected:
...
@@ -45,9 +44,8 @@ protected:
bool
m_isEESchemaNetlist
;
bool
m_isEESchemaNetlist
;
PARAM_CFG_ARRAY
m_projectFileParams
;
PARAM_CFG_ARRAY
m_projectFileParams
;
public
:
public
:
CVPCB_MAINFRAME
(
const
wxString
&
title
,
CVPCB_MAINFRAME
(
const
wxString
&
title
,
long
style
=
KICAD_DEFAULT_DRAWFRAME_STYLE
);
long
style
=
KICAD_DEFAULT_DRAWFRAME_STYLE
);
~
CVPCB_MAINFRAME
();
~
CVPCB_MAINFRAME
();
void
OnLeftClick
(
wxListEvent
&
event
);
void
OnLeftClick
(
wxListEvent
&
event
);
...
@@ -108,21 +106,21 @@ public:
...
@@ -108,21 +106,21 @@ public:
* fills m_footprints
* fills m_footprints
* @return true if libraries are found, false otherwise.
* @return true if libraries are found, false otherwise.
*/
*/
bool
LoadFootprintFiles
(
);
bool
LoadFootprintFiles
(
);
/**
/**
* function GenNetlistPcbnew
* function GenNetlistPcbnew
* writes the output netlist file
* writes the output netlist file
*
*
*/
*/
int
GenNetlistPcbnew
(
FILE
*
f
,
bool
isEESchemaNetlist
=
true
);
int
GenNetlistPcbnew
(
FILE
*
f
,
bool
isEESchemaNetlist
=
true
);
/**
/**
* Function LoadComponentFile
* Function LoadComponentFile
* Loads the .cmp file that stores the component/footprint association.
* Loads the .cmp file that stores the component/footprint association.
* @param aCmpFileName = the full filename of .cmp file to load
* @param aCmpFileName = the full filename of .cmp file to load
*/
*/
bool
LoadComponentFile
(
const
wxString
&
aCmpFileName
);
bool
LoadComponentFile
(
const
wxString
&
aCmpFileName
);
PARAM_CFG_ARRAY
&
GetProjectFileParameters
(
void
);
PARAM_CFG_ARRAY
&
GetProjectFileParameters
(
void
);
...
...
cvpcb/setvisu.cpp
View file @
0b9f39fa
...
@@ -31,28 +31,32 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
...
@@ -31,28 +31,32 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
FootprintName
=
m_FootprintList
->
GetSelectedFootprint
();
FootprintName
=
m_FootprintList
->
GetSelectedFootprint
();
if
(
Draw
Frame
==
NULL
)
if
(
m_DisplayFootprint
Frame
==
NULL
)
{
{
Draw
Frame
=
new
DISPLAY_FOOTPRINTS_FRAME
(
this
,
_
(
"Module"
),
m_DisplayFootprint
Frame
=
new
DISPLAY_FOOTPRINTS_FRAME
(
this
,
_
(
"Module"
),
wxPoint
(
0
,
0
),
wxPoint
(
0
,
0
),
wxSize
(
600
,
400
),
wxSize
(
600
,
400
),
KICAD_DEFAULT_DRAWFRAME_STYLE
);
KICAD_DEFAULT_DRAWFRAME_STYLE
);
IsNew
=
true
;
IsNew
=
true
;
Draw
Frame
->
Show
(
true
);
m_DisplayFootprint
Frame
->
Show
(
true
);
}
}
else
else
{
{
DrawFrame
->
Raise
();
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if
(
m_DisplayFootprintFrame
->
IsIconized
()
)
m_DisplayFootprintFrame
->
Iconize
(
false
);
m_DisplayFootprintFrame
->
Raise
();
// Raising the window does not set the focus on Linux. This should work on any platform.
// Raising the window does not set the focus on Linux. This should work on any platform.
if
(
wxWindow
::
FindFocus
()
!=
Draw
Frame
)
if
(
wxWindow
::
FindFocus
()
!=
m_DisplayFootprint
Frame
)
Draw
Frame
->
SetFocus
();
m_DisplayFootprint
Frame
->
SetFocus
();
}
}
if
(
!
FootprintName
.
IsEmpty
()
)
if
(
!
FootprintName
.
IsEmpty
()
)
{
{
msg
=
_
(
"Footprint: "
)
+
FootprintName
;
msg
=
_
(
"Footprint: "
)
+
FootprintName
;
Draw
Frame
->
SetTitle
(
msg
);
m_DisplayFootprint
Frame
->
SetTitle
(
msg
);
FOOTPRINT_INFO
*
Module
=
m_footprints
.
GetModuleInfo
(
FootprintName
);
FOOTPRINT_INFO
*
Module
=
m_footprints
.
GetModuleInfo
(
FootprintName
);
msg
=
_
(
"Lib: "
);
msg
=
_
(
"Lib: "
);
...
@@ -61,32 +65,32 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
...
@@ -61,32 +65,32 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
else
else
msg
+=
wxT
(
"???"
);
msg
+=
wxT
(
"???"
);
Draw
Frame
->
SetStatusText
(
msg
,
0
);
m_DisplayFootprint
Frame
->
SetStatusText
(
msg
,
0
);
if
(
Draw
Frame
->
GetBoard
()
->
m_Modules
.
GetCount
()
)
if
(
m_DisplayFootprint
Frame
->
GetBoard
()
->
m_Modules
.
GetCount
()
)
{
{
// there is only one module in the list
// there is only one module in the list
Draw
Frame
->
GetBoard
()
->
m_Modules
.
DeleteAll
();
m_DisplayFootprint
Frame
->
GetBoard
()
->
m_Modules
.
DeleteAll
();
}
}
MODULE
*
mod
=
Draw
Frame
->
Get_Module
(
FootprintName
);
MODULE
*
mod
=
m_DisplayFootprint
Frame
->
Get_Module
(
FootprintName
);
if
(
mod
)
if
(
mod
)
Draw
Frame
->
GetBoard
()
->
m_Modules
.
PushBack
(
mod
);
m_DisplayFootprint
Frame
->
GetBoard
()
->
m_Modules
.
PushBack
(
mod
);
Draw
Frame
->
Zoom_Automatique
(
false
);
m_DisplayFootprint
Frame
->
Zoom_Automatique
(
false
);
Draw
Frame
->
DrawPanel
->
Refresh
();
m_DisplayFootprint
Frame
->
DrawPanel
->
Refresh
();
Draw
Frame
->
UpdateStatusBar
();
/* Display new cursor coordinates and zoom value */
m_DisplayFootprint
Frame
->
UpdateStatusBar
();
/* Display new cursor coordinates and zoom value */
if
(
Draw
Frame
->
m_Draw3DFrame
)
if
(
m_DisplayFootprint
Frame
->
m_Draw3DFrame
)
Draw
Frame
->
m_Draw3DFrame
->
NewDisplay
();
m_DisplayFootprint
Frame
->
m_Draw3DFrame
->
NewDisplay
();
}
}
else
if
(
!
IsNew
)
else
if
(
!
IsNew
)
{
{
Draw
Frame
->
Refresh
();
m_DisplayFootprint
Frame
->
Refresh
();
if
(
Draw
Frame
->
m_Draw3DFrame
)
if
(
m_DisplayFootprint
Frame
->
m_Draw3DFrame
)
Draw
Frame
->
m_Draw3DFrame
->
NewDisplay
();
m_DisplayFootprint
Frame
->
m_Draw3DFrame
->
NewDisplay
();
}
}
}
}
...
...
pcbnew/edit.cpp
View file @
0b9f39fa
...
@@ -168,6 +168,8 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -168,6 +168,8 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
}
else
else
{
{
if
(
m_ModuleEditFrame
->
IsIconized
()
)
m_ModuleEditFrame
->
Iconize
(
false
);
m_ModuleEditFrame
->
Raise
();
m_ModuleEditFrame
->
Raise
();
// Raising the window does not set the focus on Linux. This should work on
// Raising the window does not set the focus on Linux. This should work on
...
...
pcbnew/moduleframe.cpp
View file @
0b9f39fa
...
@@ -325,6 +325,10 @@ void WinEDA_ModuleEditFrame::Show3D_Frame( wxCommandEvent& event )
...
@@ -325,6 +325,10 @@ void WinEDA_ModuleEditFrame::Show3D_Frame( wxCommandEvent& event )
{
{
if
(
m_Draw3DFrame
)
if
(
m_Draw3DFrame
)
{
{
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if
(
m_Draw3DFrame
->
IsIconized
()
)
m_Draw3DFrame
->
Iconize
(
false
);
m_Draw3DFrame
->
Raise
();
m_Draw3DFrame
->
Raise
();
// Raising the window does not set the focus on Linux. This should work on any platform.
// Raising the window does not set the focus on Linux. This should work on any platform.
...
...
pcbnew/pcbframe.cpp
View file @
0b9f39fa
...
@@ -483,6 +483,10 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event )
...
@@ -483,6 +483,10 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event )
{
{
if
(
m_Draw3DFrame
)
if
(
m_Draw3DFrame
)
{
{
// Raising the window does not show the window on Windows if iconized.
// This should work on any platform.
if
(
m_Draw3DFrame
->
IsIconized
()
)
m_Draw3DFrame
->
Iconize
(
false
);
m_Draw3DFrame
->
Raise
();
m_Draw3DFrame
->
Raise
();
// Raising the window does not set the focus on Linux. This should work on any platform.
// Raising the window does not set the focus on Linux. This should work on any platform.
...
...
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