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
8bde66af
Commit
8bde66af
authored
Feb 24, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema, Pcbnew, fix issues when creating new pins, tracks or segments.
parent
f52ed783
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
168 additions
and
165 deletions
+168
-165
edaappl.cpp
common/edaappl.cpp
+5
-6
libedit_onleftclick.cpp
eeschema/libedit_onleftclick.cpp
+70
-74
symbdraw.cpp
eeschema/symbdraw.cpp
+1
-2
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+26
-23
onleftclick.cpp
pcbnew/onleftclick.cpp
+66
-60
No files found.
common/edaappl.cpp
View file @
8bde66af
...
...
@@ -48,6 +48,7 @@ static const wxChar* CommonConfigPath = wxT( "kicad_common" );
/* Default font size */
#define FONT_DEFAULT_SIZE 10
/* Default font size. */
static
wxString
languageCfgKey
(
wxT
(
"LanguageID"
)
);
/**
* The real font size will be computed at run time
...
...
@@ -336,8 +337,7 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId )
ReadPdfBrowserInfos
();
// Internationalization: loading the kicad suitable Dictionary
m_EDA_CommonConfig
->
Read
(
wxT
(
"Language"
),
&
m_LanguageId
,
wxLANGUAGE_DEFAULT
);
m_EDA_CommonConfig
->
Read
(
languageCfgKey
,
&
m_LanguageId
,
wxLANGUAGE_DEFAULT
);
bool
succes
=
SetLanguage
(
TRUE
);
if
(
!
succes
)
...
...
@@ -627,8 +627,7 @@ void WinEDA_App::GetSettings(bool aReopenLastUsedDirectory)
m_HelpSize
.
x
=
500
;
m_HelpSize
.
y
=
400
;
m_LanguageId
=
m_EDA_CommonConfig
->
Read
(
wxT
(
"Language"
),
wxLANGUAGE_DEFAULT
);
m_LanguageId
=
m_EDA_CommonConfig
->
Read
(
languageCfgKey
,
wxLANGUAGE_DEFAULT
);
m_EditorName
=
m_EDA_CommonConfig
->
Read
(
wxT
(
"Editor"
)
);
m_fileHistory
.
Load
(
*
m_EDA_Config
);
...
...
@@ -718,10 +717,10 @@ bool WinEDA_App::SetLanguage( bool first_time )
if
(
!
first_time
)
{
m_EDA_CommonConfig
->
Write
(
wxT
(
"Language"
)
,
m_LanguageId
);
m_EDA_CommonConfig
->
Write
(
languageCfgKey
,
m_LanguageId
);
}
// Test if floating point notation is working (bug in cross compilation)
// Test if floating point notation is working (bug in cross compilation
, using wine
)
// Make a conversion double <=> string
double
dtst
=
0.5
;
wxString
msg
;
...
...
eeschema/libedit_onleftclick.cpp
View file @
8bde66af
...
...
@@ -25,21 +25,7 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
if
(
m_component
==
NULL
)
// No component loaded !
return
;
if
(
DrawEntry
&&
DrawEntry
->
m_Flags
)
{
switch
(
DrawEntry
->
Type
()
)
{
case
LIB_PIN_T
:
PlacePin
(
DC
);
DrawEntry
=
NULL
;
break
;
default
:
EndDrawGraphicItem
(
DC
);
break
;
}
}
else
if
(
DrawEntry
==
NULL
||
DrawEntry
->
m_Flags
==
0
)
{
DrawEntry
=
m_component
->
LocateDrawItem
(
m_unit
,
m_convert
,
TYPE_NOT_INIT
,
aPosition
);
...
...
@@ -56,12 +42,23 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
DisplayCmpDoc
();
}
if
(
m_ID_current_state
)
{
switch
(
m_ID_current_state
)
{
case
0
:
case
ID_LIBEDIT_NO_TOOL
:
if
(
DrawEntry
&&
DrawEntry
->
m_Flags
)
// moved object
{
switch
(
DrawEntry
->
Type
()
)
{
case
LIB_PIN_T
:
PlacePin
(
DC
);
break
;
default
:
EndDrawGraphicItem
(
DC
);
break
;
}
}
break
;
case
ID_LIBEDIT_PIN_BUTT
:
...
...
@@ -130,7 +127,6 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
break
;
}
}
}
...
...
eeschema/symbdraw.cpp
View file @
8bde66af
...
...
@@ -134,10 +134,9 @@ LIB_DRAW_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC*
switch
(
m_ID_current_state
)
{
case
ID_LIBEDIT_BODY_ARC_BUTT
:
{
m_drawItem
=
new
LIB_ARC
(
LibEntry
);
break
;
}
case
ID_LIBEDIT_BODY_CIRCLE_BUTT
:
m_drawItem
=
new
LIB_CIRCLE
(
LibEntry
);
break
;
...
...
pcbnew/modedit_onclick.cpp
View file @
8bde66af
...
...
@@ -27,7 +27,9 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawPanel
->
CrossHairOff
(
DC
);
if
(
item
&&
item
->
m_Flags
)
// Command in progress
if
(
m_ID_current_state
==
0
||
m_ID_current_state
==
ID_MODEDIT_NO_TOOL
)
{
if
(
item
&&
item
->
m_Flags
)
// Move item command in progress
{
switch
(
item
->
Type
()
)
{
...
...
@@ -55,6 +57,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
}
}
}
}
item
=
GetCurItem
();
...
...
@@ -79,9 +82,9 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
int
shape
=
S_SEGMENT
;
if
(
m_ID_current_state
==
ID_
PCB_CIRCLE_BUTT
)
if
(
m_ID_current_state
==
ID_
MODEDIT_CIRCLE_TOOL
)
shape
=
S_CIRCLE
;
if
(
m_ID_current_state
==
ID_
PCB_ARC_BUTT
)
if
(
m_ID_current_state
==
ID_
MODEDIT_ARC_TOOL
)
shape
=
S_ARC
;
SetCurItem
(
Begin_Edge_Module
(
(
EDGE_MODULE
*
)
NULL
,
DC
,
shape
)
);
...
...
pcbnew/onleftclick.cpp
View file @
8bde66af
...
...
@@ -20,10 +20,13 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{
BOARD_ITEM
*
DrawStruct
=
GetCurItem
();
bool
exit
=
false
;
bool
no_tool
=
m_ID_current_state
==
0
||
m_ID_current_state
==
ID_PCB_NO_TOOL
;
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
// Command in progress
if
(
no_tool
||
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
false
;
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
// Command in progress
{
DrawPanel
->
m_IgnoreMouseEvents
=
true
;
DrawPanel
->
CrossHairOff
(
aDC
);
...
...
@@ -75,8 +78,11 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
break
;
case
TYPE_DRAWSEGMENT
:
if
(
no_tool
)
// when no tools: existing item moving.
{
Place_DrawItem
(
(
DRAWSEGMENT
*
)
DrawStruct
,
aDC
);
exit
=
true
;
}
break
;
case
TYPE_DIMENSION
:
...
...
@@ -97,7 +103,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if
(
exit
)
return
;
}
else
if
(
!
wxGetKeyState
(
WXK_SHIFT
)
&&
!
wxGetKeyState
(
WXK_ALT
)
&&
!
wxGetKeyState
(
WXK_CONTROL
)
)
{
...
...
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