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
f56e2e14
Commit
f56e2e14
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed switching between GAL canvases error.
parent
9a47f4c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
pcbframe.cpp
pcbnew/pcbframe.cpp
+10
-7
No files found.
pcbnew/pcbframe.cpp
View file @
f56e2e14
...
...
@@ -489,12 +489,15 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
if
(
IsGalCanvasActive
()
)
{
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
)
->
DisplayBoard
(
aBoard
);
PCB_DRAW_PANEL_GAL
*
drawPanel
=
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
);
drawPanel
->
DisplayBoard
(
aBoard
);
aBoard
->
GetRatsnest
()
->
Recalculate
();
// Prepare worksheet template
KIGFX
::
WORKSHEET_VIEWITEM
*
worksheet
=
new
KIGFX
::
WORKSHEET_VIEWITEM
(
&
aBoard
->
GetPageSettings
(),
&
aBoard
->
GetTitleBlock
()
);
KIGFX
::
WORKSHEET_VIEWITEM
*
worksheet
;
worksheet
=
new
KIGFX
::
WORKSHEET_VIEWITEM
(
&
aBoard
->
GetPageSettings
(),
&
aBoard
->
GetTitleBlock
()
);
worksheet
->
SetSheetName
(
std
::
string
(
GetScreenDesc
().
mb_str
()
)
);
BASE_SCREEN
*
screen
=
GetScreen
();
...
...
@@ -506,13 +509,13 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
}
// PCB_DRAW_PANEL_GAL takes ownership of the worksheet
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
)
->
SetWorksheet
(
worksheet
);
drawPanel
->
SetWorksheet
(
worksheet
);
// update the tool manager with the new board and its view.
if
(
m_toolManager
)
{
m_toolManager
->
SetEnvironment
(
aBoard
,
GetGalCanvas
()
->
GetView
(),
GetGalCanvas
()
->
GetViewControls
(),
this
);
m_toolManager
->
SetEnvironment
(
aBoard
,
drawPanel
->
GetView
(),
drawPanel
->
GetViewControls
(),
this
);
m_toolManager
->
ResetTools
(
TOOL_BASE
::
MODEL_RELOAD
);
}
}
...
...
@@ -638,7 +641,7 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
if
(
aEnable
)
{
SetBoard
(
m_Pcb
);
GetGalCanvas
()
->
GetView
()
->
RecacheAllItems
(
true
);
GetGalCanvas
()
->
StartDrawing
();
}
}
...
...
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