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
60c1cbe8
Commit
60c1cbe8
authored
Jul 27, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issues with wxWidgets 2.9.1
parent
141d5b5f
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
308 additions
and
307 deletions
+308
-307
drawframe.cpp
common/drawframe.cpp
+20
-16
edit.cpp
gerbview/edit.cpp
+259
-261
tool_gerber.cpp
gerbview/tool_gerber.cpp
+0
-3
class_drawpanel.h
include/class_drawpanel.h
+2
-2
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+1
-2
wxstruct.h
include/wxstruct.h
+14
-2
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+5
-6
files.cpp
pcbnew/files.cpp
+4
-0
moduleframe.cpp
pcbnew/moduleframe.cpp
+2
-0
pcbnew.cpp
pcbnew/pcbnew.cpp
+1
-1
tool_modedit.cpp
pcbnew/tool_modedit.cpp
+0
-7
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+0
-7
No files found.
common/drawframe.cpp
View file @
60c1cbe8
...
...
@@ -364,29 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
}
/*
/*
* Function SetToolID
* Enables the icon of the selected tool in the vertical toolbar.
* (Or tool ID_NO_SELECT_BUTT default if no new selection)
* if (id >= 0)
* @param aId = new m_ID_current_state value (if aId >= 0)
* @param aCursor = the new cursor shape (0 = default cursor)
* @param aTitle = tool message in status bar
* if (aId >= 0)
* Updates all variables related:
* Message m_ID_current_state, cursor
* If (id < 0)
* Only updates the variables message and cursor
* m_ID_current_state, cursor shape and message in status bar
* If (aId < 0)
* Only updates the cursor shape and message in status bar
* (does not the current m_ID_current_state value
*/
void
WinEDA_DrawFrame
::
SetToolID
(
int
id
,
int
new_cursor_id
,
const
wxString
&
title
)
void
WinEDA_DrawFrame
::
SetToolID
(
int
aId
,
int
aCursor
,
const
wxString
&
aToolMsg
)
{
// Keep default cursor in toolbars
SetCursor
(
wxNullCursor
);
// Change Cursor in DrawPanel only
if
(
DrawPanel
)
{
DrawPanel
->
m_PanelDefaultCursor
=
new_cursor_id
;
DrawPanel
->
SetCursor
(
new_cursor_id
);
DrawPanel
->
m_PanelDefaultCursor
=
aCursor
;
DrawPanel
->
SetCursor
(
aCursor
);
}
DisplayToolMsg
(
title
);
DisplayToolMsg
(
aToolMsg
);
if
(
i
d
<
0
)
if
(
aI
d
<
0
)
return
;
// Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool.
...
...
@@ -400,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
}
else
{
if
(
i
d
)
if
(
aI
d
)
{
if
(
m_VToolBar
)
m_VToolBar
->
ToggleTool
(
ID_NO_SELECT_BUTT
,
FALSE
);
...
...
@@ -412,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
m_VToolBar
->
ToggleTool
(
ID_NO_SELECT_BUTT
,
TRUE
);
}
if
(
i
d
)
if
(
aI
d
)
{
if
(
m_VToolBar
)
m_VToolBar
->
ToggleTool
(
i
d
,
TRUE
);
m_VToolBar
->
ToggleTool
(
aI
d
,
TRUE
);
if
(
m_AuxVToolBar
)
m_AuxVToolBar
->
ToggleTool
(
i
d
,
TRUE
);
m_AuxVToolBar
->
ToggleTool
(
aI
d
,
TRUE
);
}
else
if
(
m_VToolBar
)
m_VToolBar
->
ToggleTool
(
ID_NO_SELECT_BUTT
,
TRUE
);
m_ID_current_state
=
i
d
;
m_ID_current_state
=
aI
d
;
if
(
m_VToolBar
)
m_VToolBar
->
Refresh
(
);
}
...
...
gerbview/edit.cpp
View file @
60c1cbe8
This diff is collapsed.
Click to expand it.
gerbview/tool_gerber.cpp
View file @
60c1cbe8
...
...
@@ -246,7 +246,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
// after adding the buttons to the toolbar, must call Realize() to reflect
// the changes
m_HToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -272,7 +271,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
_
(
"Delete items"
)
);
m_VToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -339,5 +337,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
m_OptionsToolBar
->
Realize
();
SetToolbars
();
}
include/class_drawpanel.h
View file @
60c1cbe8
...
...
@@ -44,6 +44,8 @@ public:
// ignore mouse events
bool
m_Block_Enable
;
// TRUE to accept Block Commands
// useful to avoid false start block in certain cases
// (like switch from a sheet to an other sheet
int
m_CanStartBlock
;
// >= 0 (or >= n) if a block can
// start
bool
m_PrintIsMirrored
;
// True when drawing in mirror
...
...
@@ -51,8 +53,6 @@ public:
// because arcs are oriented, and
// in mirror mode, orientations are
// reversed
// useful to avoid false start block in certain cases (like switch from a
// sheet to an other sheet
int
m_PanelDefaultCursor
;
// Current mouse cursor default
// shape id for this window
int
m_PanelCursor
;
// Current mouse cursor shape id
...
...
include/wxBasePcbFrame.h
View file @
60c1cbe8
...
...
@@ -104,8 +104,7 @@ public:
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
virtual
void
ReCreateMenuBar
();
virtual
void
SetToolID
(
int
id
,
int
new_cursor_id
,
const
wxString
&
title
);
virtual
void
SetToolID
(
int
aId
,
int
aCursor
,
const
wxString
&
aToolMsg
);
virtual
void
UpdateStatusBar
();
PCB_SCREEN
*
GetScreen
()
const
...
...
include/wxstruct.h
View file @
60c1cbe8
...
...
@@ -239,8 +239,20 @@ public:
virtual
void
ReCreateVToolbar
()
=
0
;
virtual
void
ReCreateMenuBar
();
virtual
void
ReCreateAuxiliaryToolbar
();
virtual
void
SetToolID
(
int
id
,
int
new_cursor_id
,
const
wxString
&
title
);
/** Function SetToolID
* Enables the icon of the selected tool in the vertical toolbar.
* (Or tool ID_NO_SELECT_BUTT default if no new selection)
* @param aId = new m_ID_current_state value (if aId >= 0)
* @param aCursor = the new cursor shape
* @param aToolMsg = tool message in status bar
* if (aId >= 0)
* Updates all variables related:
* m_ID_current_state, cursor shape and message in status bar
* If (aId < 0)
* Only updates the cursor shape and message in status bar
* (does not the current m_ID_current_state value
*/
virtual
void
SetToolID
(
int
aId
,
int
aCursor
,
const
wxString
&
aToolMsg
);
/* Thes 4 functions provide a basic way to sho/hide grid
* and /get/set grid color.
...
...
pcbnew/basepcbframe.cpp
View file @
60c1cbe8
...
...
@@ -288,19 +288,18 @@ GENERAL_COLLECTORS_GUIDE WinEDA_BasePcbFrame::GetCollectorsGuide()
return
guide
;
}
void
WinEDA_BasePcbFrame
::
SetToolID
(
int
id
,
int
new_cursor_id
,
const
wxString
&
title
)
void
WinEDA_BasePcbFrame
::
SetToolID
(
int
aId
,
int
aCursor
,
const
wxString
&
aToolMsg
)
{
bool
redraw
=
false
;
WinEDA_DrawFrame
::
SetToolID
(
id
,
new_cursor_id
,
title
);
WinEDA_DrawFrame
::
SetToolID
(
aId
,
aCursor
,
aToolMsg
);
if
(
i
d
<
0
)
if
(
aI
d
<
0
)
return
;
// handle color changes for transitions in and out of ID_TRACK_BUTT
if
(
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
i
d
!=
ID_TRACK_BUTT
)
||
(
m_ID_current_state
!=
ID_TRACK_BUTT
&&
id
==
ID_TRACK_BUTT
)
)
if
(
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
aI
d
!=
ID_TRACK_BUTT
)
||
(
m_ID_current_state
!=
ID_TRACK_BUTT
&&
aId
==
ID_TRACK_BUTT
)
)
{
if
(
DisplayOpt
.
ContrastModeDisplay
)
redraw
=
true
;
...
...
pcbnew/files.cpp
View file @
60c1cbe8
...
...
@@ -29,6 +29,7 @@ void WinEDA_PcbFrame::OnFileHistory( wxCommandEvent& event )
::
wxSetWorkingDirectory
(
::
wxPathOnly
(
fn
)
);
LoadOnePcbFile
(
fn
);
ReCreateAuxiliaryToolbar
();
SetToolbars
();
DrawPanel
->
MouseToCursorSchema
();
}
}
...
...
@@ -49,6 +50,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
case
ID_LOAD_FILE
:
LoadOnePcbFile
(
GetScreen
()
->
m_FileName
,
false
,
true
);
ReCreateAuxiliaryToolbar
();
SetToolbars
();
break
;
case
ID_MENU_READ_LAST_SAVED_VERSION_BOARD
:
...
...
@@ -84,6 +86,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
GetScreen
()
->
m_FileName
=
fn
.
GetFullPath
();
SetTitle
(
GetScreen
()
->
m_FileName
);
ReCreateAuxiliaryToolbar
();
SetToolbars
();
break
;
}
...
...
@@ -98,6 +101,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
GetChars
(
PcbFileExtension
)
);
SetTitle
(
GetScreen
()
->
m_FileName
);
ReCreateLayerBox
(
NULL
);
SetToolbars
();
break
;
case
ID_SAVE_BOARD
:
...
...
pcbnew/moduleframe.cpp
View file @
60c1cbe8
...
...
@@ -231,6 +231,8 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)
).
Bottom
()
);
m_auimgr
.
Update
();
SetToolbars
();
}
...
...
pcbnew/pcbnew.cpp
View file @
60c1cbe8
...
...
@@ -112,6 +112,7 @@ bool WinEDA_App::OnInit()
}
ScreenPcb
=
new
PCB_SCREEN
();
ActiveScreen
=
ScreenPcb
;
// read current setup and reopen last directory if no filename to open in command line
bool
reopenLastUsedDirectory
=
argc
==
1
;
...
...
@@ -140,7 +141,6 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
frame
=
new
WinEDA_PcbFrame
(
NULL
,
wxT
(
"PcbNew"
),
wxPoint
(
0
,
0
),
wxSize
(
600
,
400
)
);
frame
->
SetTitle
(
GetTitle
()
+
wxT
(
" "
)
+
GetBuildVersion
()
);
ActiveScreen
=
ScreenPcb
;
SetTopWindow
(
frame
);
frame
->
Show
(
true
);
...
...
pcbnew/tool_modedit.cpp
View file @
60c1cbe8
...
...
@@ -133,7 +133,6 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar()
// after adding the buttons to the toolbar, must call Realize() to reflect
// the changes
m_HToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -187,8 +186,6 @@ void WinEDA_ModuleEditFrame::ReCreateVToolbar()
wxITEM_CHECK
);
m_VToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -238,8 +235,6 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
_
(
"Show Edges Sketch"
),
wxITEM_CHECK
);
m_OptionsToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -328,6 +323,4 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
if
(
m_LastGridSizeId
==
GetScreen
()
->
m_GridList
[
i
].
m_Id
)
m_SelGridBox
->
SetSelection
(
i
);
}
SetToolbars
();
}
pcbnew/tool_pcb.cpp
View file @
60c1cbe8
...
...
@@ -288,7 +288,6 @@ void WinEDA_PcbFrame::ReCreateHToolbar()
// the changes
m_HToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -389,7 +388,6 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
m_OptionsToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -475,7 +473,6 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
wxITEM_CHECK
);
m_VToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -517,8 +514,6 @@ void WinEDA_PcbFrame::ReCreateMicrowaveVToolbar()
_
(
"Create a polynomial shape for microwave applications"
)
);
m_AuxVToolBar
->
Realize
();
SetToolbars
();
}
...
...
@@ -676,8 +671,6 @@ an existing track use its width\notherwise, use current width setting" ),
m_TrackAndViasSizesList_Changed
=
true
;
ReCreateLayerBox
(
NULL
);
SetToolbars
();
}
...
...
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