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
Show 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,11 +489,14 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
...
@@ -489,11 +489,14 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
if
(
IsGalCanvasActive
()
)
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
();
aBoard
->
GetRatsnest
()
->
Recalculate
();
// Prepare worksheet template
// Prepare worksheet template
KIGFX
::
WORKSHEET_VIEWITEM
*
worksheet
=
new
KIGFX
::
WORKSHEET_VIEWITEM
(
&
aBoard
->
GetPageSettings
(),
KIGFX
::
WORKSHEET_VIEWITEM
*
worksheet
;
worksheet
=
new
KIGFX
::
WORKSHEET_VIEWITEM
(
&
aBoard
->
GetPageSettings
(),
&
aBoard
->
GetTitleBlock
()
);
&
aBoard
->
GetTitleBlock
()
);
worksheet
->
SetSheetName
(
std
::
string
(
GetScreenDesc
().
mb_str
()
)
);
worksheet
->
SetSheetName
(
std
::
string
(
GetScreenDesc
().
mb_str
()
)
);
...
@@ -506,13 +509,13 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
...
@@ -506,13 +509,13 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
}
}
// PCB_DRAW_PANEL_GAL takes ownership of the worksheet
// 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.
// update the tool manager with the new board and its view.
if
(
m_toolManager
)
if
(
m_toolManager
)
{
{
m_toolManager
->
SetEnvironment
(
aBoard
,
GetGalCanvas
()
->
GetView
(),
m_toolManager
->
SetEnvironment
(
aBoard
,
drawPanel
->
GetView
(),
GetGalCanvas
()
->
GetViewControls
(),
this
);
drawPanel
->
GetViewControls
(),
this
);
m_toolManager
->
ResetTools
(
TOOL_BASE
::
MODEL_RELOAD
);
m_toolManager
->
ResetTools
(
TOOL_BASE
::
MODEL_RELOAD
);
}
}
}
}
...
@@ -638,7 +641,7 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
...
@@ -638,7 +641,7 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
if
(
aEnable
)
if
(
aEnable
)
{
{
SetBoard
(
m_Pcb
);
SetBoard
(
m_Pcb
);
GetGalCanvas
()
->
GetView
()
->
RecacheAllItems
(
true
);
GetGalCanvas
()
->
StartDrawing
();
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