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
9195409f
Commit
9195409f
authored
Sep 08, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: GAL updates the worksheet layout when it is reloaded.
parent
2c1cef33
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
12 deletions
+29
-12
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+4
-1
pcbframe.cpp
pcbnew/pcbframe.cpp
+24
-10
No files found.
include/wxBasePcbFrame.h
View file @
9195409f
...
...
@@ -135,7 +135,7 @@ public:
*/
EDA_RECT
GetBoardBoundingBox
(
bool
aBoardEdgesOnly
=
false
)
const
;
v
oid
SetPageSettings
(
const
PAGE_INFO
&
aPageSettings
);
// overload
v
irtual
void
SetPageSettings
(
const
PAGE_INFO
&
aPageSettings
);
// overload
const
PAGE_INFO
&
GetPageSettings
()
const
;
// overload
const
wxSize
GetPageSizeIU
()
const
;
// overload
...
...
include/wxPcbStruct.h
View file @
9195409f
...
...
@@ -855,9 +855,12 @@ public:
*/
bool
Clear_Pcb
(
bool
aQuery
);
/// @copydoc PCB_BASE_FRAME::SetBoard()
///
>
@copydoc PCB_BASE_FRAME::SetBoard()
void
SetBoard
(
BOARD
*
aBoard
);
///> @copydoc PCB_BASE_FRAME::SetPageSettings()
void
SetPageSettings
(
const
PAGE_INFO
&
aPageSettings
);
// overload
// Drc control
/* function GetDrcController
...
...
pcbnew/pcbframe.cpp
View file @
9195409f
...
...
@@ -500,10 +500,32 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
drawPanel
->
DisplayBoard
(
aBoard
);
aBoard
->
GetRatsnest
()
->
Recalculate
();
// reload the worksheet
SetPageSettings
(
aBoard
->
GetPageSettings
()
);
// update the tool manager with the new board and its view.
if
(
m_toolManager
)
{
m_toolManager
->
SetEnvironment
(
aBoard
,
drawPanel
->
GetView
(),
drawPanel
->
GetViewControls
(),
this
);
m_toolManager
->
ResetTools
(
TOOL_BASE
::
MODEL_RELOAD
);
}
}
}
void
PCB_EDIT_FRAME
::
SetPageSettings
(
const
PAGE_INFO
&
aPageSettings
)
{
PCB_BASE_FRAME
::
SetPageSettings
(
aPageSettings
);
if
(
IsGalCanvasActive
()
)
{
PCB_DRAW_PANEL_GAL
*
drawPanel
=
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
);
// Prepare worksheet template
KIGFX
::
WORKSHEET_VIEWITEM
*
worksheet
;
worksheet
=
new
KIGFX
::
WORKSHEET_VIEWITEM
(
&
aBoard
->
GetPageSettings
(),
&
aBoard
->
GetTitleBlock
()
);
worksheet
=
new
KIGFX
::
WORKSHEET_VIEWITEM
(
&
m_Pcb
->
GetPageSettings
(),
&
m_Pcb
->
GetTitleBlock
()
);
worksheet
->
SetSheetName
(
std
::
string
(
GetScreenDesc
().
mb_str
()
)
);
BASE_SCREEN
*
screen
=
GetScreen
();
...
...
@@ -516,14 +538,6 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
// PCB_DRAW_PANEL_GAL takes ownership of the worksheet
drawPanel
->
SetWorksheet
(
worksheet
);
// update the tool manager with the new board and its view.
if
(
m_toolManager
)
{
m_toolManager
->
SetEnvironment
(
aBoard
,
drawPanel
->
GetView
(),
drawPanel
->
GetViewControls
(),
this
);
m_toolManager
->
ResetTools
(
TOOL_BASE
::
MODEL_RELOAD
);
}
}
}
...
...
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