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
4757c175
Commit
4757c175
authored
May 09, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a minor bud in pinedit. COMPILING.txt updated
parent
56b87897
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
66 deletions
+55
-66
COMPILING.txt
COMPILING.txt
+22
-19
pinedit.cpp
eeschema/pinedit.cpp
+33
-47
No files found.
COMPILING.txt
View file @
4757c175
...
@@ -119,31 +119,34 @@ will have to restart and command shells for the new path to take effect.
...
@@ -119,31 +119,34 @@ will have to restart and command shells for the new path to take effect.
Verify that cmake is in your path by trying to run it from a command prompt.
Verify that cmake is in your path by trying to run it from a command prompt.
If linux, use your package manager to install cmake. You should get cmake 2.
4.7
If linux, use your package manager to install cmake. You should get cmake 2.
6.1
or later. If only an older one is available in your package repository, build
or later. If only an older one is available in your package repository, build
2.
4.7
from source. Verify that cmake is in your path by trying to run it from a
2.
6.1
from source. Verify that cmake is in your path by trying to run it from a
command prompt.
command prompt.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
7) Install Boost C++ Libraries
7) Install Boost C++ Libraries
If windows, well I'm guessing, so somebody please try these two options and
Under linux, boost is already installed, but can be too old.
correct this text please according to which ever is easier:
If this is the case, you *must* update boost.
(optionA) Go to http://sourceforge.net/project/showfiles.php?group_id=7586
Go to http://www.boost.org/ dowlload the latest version of boost.
and download boost_1_34_1.zip or later and unzip it so as to put the files
unzip (or untar) boots file.
into C:\Program Files\boost\boost_1_34_1
under Windows, files can be installed (unzipped) everywhere, but when create makefiles using cmake,
(optionB)
you will have a message saying boost is not found, something like:
Go to http://www.boost-consulting.com/products/free
and download the http://www.boost-consulting.com/boost_1_34_1_setup.exe
-- Check for installed Boost -- not found
file and run it.
CMake Error at CMakeModules/CheckFindPackageResult.cmake:6 (message):
Boost was not found - it is required to build Kicad
If linux, and using a GCC earlier than 4.2, then install the
"Boost C++ Libraries development files" or similarly named package using your
Edit the CMakeCache.txt file to replace the Boost_INCLUDE_DIR "notfound" value by the right value:
package manager. Note that if you are using gcc 4.2 or later, there were
You must find a line like
incompatibilities that exist between boost 1.34.1 and gcc 4.2. So in this case,
//Path to a file.
instead of installing boost using your package manager, you should use the svn
Boost_INCLUDE_DIR:PATH=Boost_INCLUDE_DIR-NOTFOUND
HEAD copy which overcomes the gcc 4.2 incompatibility, specifically with
<boost/ptr_container/ptr_vector.hpp>.
and edit it to set the right path, something like:
Boost_INCLUDE_DIR:PATH=f:/boost/boost
(on my computer boost is unzipper in f:\boost, and boost installed files are in f:\boost\boost)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
...
...
eeschema/pinedit.cpp
View file @
4757c175
...
@@ -44,9 +44,9 @@ static int LastPinType = PIN_INPUT,
...
@@ -44,9 +44,9 @@ static int LastPinType = PIN_INPUT,
LastPinSize
=
300
,
LastPinSize
=
300
,
LastPinNameSize
=
50
,
LastPinNameSize
=
50
,
LastPinNumSize
=
50
,
LastPinNumSize
=
50
,
LastPinCommonConvert
=
FALSE
,
LastPinCommonConvert
=
false
,
LastPinCommonUnit
=
FALSE
,
LastPinCommonUnit
=
false
,
LastPinNoDraw
=
FALSE
;
LastPinNoDraw
=
false
;
#include "pinedit-dialog.cpp"
#include "pinedit-dialog.cpp"
...
@@ -80,15 +80,6 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
...
@@ -80,15 +80,6 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
{
{
if
(
!
(
CurrentDrawItem
->
m_Flags
&
IS_NEW
)
)
// if IS_NEW, copy for undo is done before place
if
(
!
(
CurrentDrawItem
->
m_Flags
&
IS_NEW
)
)
// if IS_NEW, copy for undo is done before place
m_Parent
->
SaveCopyInUndoList
(
CurrentLibEntry
);
m_Parent
->
SaveCopyInUndoList
(
CurrentLibEntry
);
LibDrawPin
*
CurrentPin
=
(
LibDrawPin
*
)
CurrentDrawItem
;
wxClientDC
dc
(
m_Parent
->
DrawPanel
);
m_Parent
->
DrawPanel
->
PrepareGraphicContext
(
&
dc
);
if
(
m_Parent
->
DrawPanel
->
ManageCurseur
)
// Pin is moving
m_Parent
->
DrawPanel
->
ManageCurseur
(
m_Parent
->
DrawPanel
,
&
dc
,
FALSE
);
else
DrawLibraryDrawStruct
(
m_Parent
->
DrawPanel
,
&
dc
,
CurrentLibEntry
,
wxPoint
(
0
,
0
),
CurrentPin
,
g_XorMode
);
SetPinName
(
m_PinNameCtrl
->
GetValue
(),
LastPinNameSize
);
SetPinName
(
m_PinNameCtrl
->
GetValue
(),
LastPinNameSize
);
msg
=
m_PinNumCtrl
->
GetValue
();
if
(
msg
.
IsEmpty
()
)
msg
=
m_PinNumCtrl
->
GetValue
();
if
(
msg
.
IsEmpty
()
)
...
@@ -98,18 +89,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
...
@@ -98,18 +89,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
SetPinShape
(
LastPinShape
);
SetPinShape
(
LastPinShape
);
SetPinType
(
LastPinType
);
SetPinType
(
LastPinType
);
SetPinOrient
(
LastPinOrient
);
SetPinOrient
(
LastPinOrient
);
SetAttributsPin
(
TRUE
,
TRUE
,
TRUE
);
SetAttributsPin
(
true
,
true
,
true
);
// Set all attributes (visibility, common to units and common to convert options)
if
(
m_Parent
->
DrawPanel
->
ManageCurseur
)
m_Parent
->
DrawPanel
->
ManageCurseur
(
m_Parent
->
DrawPanel
,
&
dc
,
FALSE
);
else
DrawLibraryDrawStruct
(
m_Parent
->
DrawPanel
,
&
dc
,
CurrentLibEntry
,
wxPoint
(
0
,
0
),
CurrentPin
,
g_XorMode
);
}
if
(
CurrentDrawItem
)
CurrentDrawItem
->
DisplayInfo
(
m_Parent
);
CurrentDrawItem
->
DisplayInfo
(
m_Parent
);
}
Close
();
Close
();
m_Parent
->
DrawPanel
->
Refresh
();
}
}
...
@@ -144,7 +129,7 @@ void WinEDA_LibeditFrame::InitEditOnePin()
...
@@ -144,7 +129,7 @@ void WinEDA_LibeditFrame::InitEditOnePin()
if
(
(
Pin
->
m_Pos
==
CurrentPin
->
m_Pos
)
if
(
(
Pin
->
m_Pos
==
CurrentPin
->
m_Pos
)
&&
(
Pin
->
m_Orient
==
CurrentPin
->
m_Orient
)
&&
(
Pin
->
m_Orient
==
CurrentPin
->
m_Orient
)
&&
(
!
(
CurrentPin
->
m_Flags
&
IS_NEW
)
)
&&
(
!
(
CurrentPin
->
m_Flags
&
IS_NEW
)
)
&&
(
g_EditPinByPinIsOn
==
FALSE
)
// This is set by the tool of the main toolbar
&&
(
g_EditPinByPinIsOn
==
false
)
// This is set by the tool of the main toolbar
)
)
Pin
->
m_Flags
|=
IS_LINKED
|
IN_EDIT
;
Pin
->
m_Flags
|=
IS_LINKED
|
IN_EDIT
;
else
else
...
@@ -165,7 +150,7 @@ static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC )
...
@@ -165,7 +150,7 @@ static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC )
LibDrawPin
*
CurrentPin
=
(
LibDrawPin
*
)
CurrentDrawItem
;
LibDrawPin
*
CurrentPin
=
(
LibDrawPin
*
)
CurrentDrawItem
;
if
(
CurrentPin
&&
(
CurrentPin
->
m_Flags
&
IS_NEW
)
)
if
(
CurrentPin
&&
(
CurrentPin
->
m_Flags
&
IS_NEW
)
)
DeleteOneLibraryDrawStruct
(
Panel
,
DC
,
CurrentLibEntry
,
CurrentPin
,
TRUE
);
DeleteOneLibraryDrawStruct
(
Panel
,
DC
,
CurrentLibEntry
,
CurrentPin
,
true
);
/* clear edit flags */
/* clear edit flags */
LibEDA_BaseStruct
*
item
=
CurrentLibEntry
->
m_Drawings
;
LibEDA_BaseStruct
*
item
=
CurrentLibEntry
->
m_Drawings
;
...
@@ -187,7 +172,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
...
@@ -187,7 +172,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
{
{
LibDrawPin
*
Pin
;
LibDrawPin
*
Pin
;
LibDrawPin
*
CurrentPin
=
(
LibDrawPin
*
)
CurrentDrawItem
;
LibDrawPin
*
CurrentPin
=
(
LibDrawPin
*
)
CurrentDrawItem
;
bool
ask_for_pin
=
TRUE
;
bool
ask_for_pin
=
true
;
wxPoint
newpos
;
wxPoint
newpos
;
bool
status
;
bool
status
;
...
@@ -212,14 +197,14 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
...
@@ -212,14 +197,14 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
continue
;
continue
;
if
(
ask_for_pin
)
if
(
ask_for_pin
)
{
{
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
DrawPanel
->
m_IgnoreMouseEvents
=
true
;
status
=
IsOK
(
this
,
_
(
"Occupied by other pin. Continue?"
)
);
status
=
IsOK
(
this
,
_
(
"Occupied by other pin. Continue?"
)
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
DrawPanel
->
m_IgnoreMouseEvents
=
false
;
if
(
!
status
)
if
(
!
status
)
return
;
return
;
else
else
ask_for_pin
=
FALSE
;
ask_for_pin
=
false
;
}
}
}
}
...
@@ -310,7 +295,7 @@ void WinEDA_LibeditFrame::StartMovePin( wxDC* DC )
...
@@ -310,7 +295,7 @@ void WinEDA_LibeditFrame::StartMovePin( wxDC* DC )
if
(
Pin
==
CurrentPin
)
if
(
Pin
==
CurrentPin
)
continue
;
continue
;
if
(
(
Pin
->
m_Pos
==
CurrentPin
->
m_Pos
)
&&
(
Pin
->
m_Orient
==
CurrentPin
->
m_Orient
)
if
(
(
Pin
->
m_Pos
==
CurrentPin
->
m_Pos
)
&&
(
Pin
->
m_Orient
==
CurrentPin
->
m_Orient
)
&&
(
g_EditPinByPinIsOn
==
FALSE
)
)
&&
(
g_EditPinByPinIsOn
==
false
)
)
Pin
->
m_Flags
|=
IS_LINKED
|
IS_MOVED
;
Pin
->
m_Flags
|=
IS_LINKED
|
IS_MOVED
;
}
}
...
@@ -514,7 +499,7 @@ void WinEDA_LibeditFrame::DeletePin( wxDC* DC,
...
@@ -514,7 +499,7 @@ void WinEDA_LibeditFrame::DeletePin( wxDC* DC,
/*************************************************/
/*************************************************/
/* Routine d'effacement de la pin pointee par la souris
/* Routine d'effacement de la pin pointee par la souris
* Si g_EditPinByPinIsOn ==
FALSE
:
* Si g_EditPinByPinIsOn ==
false
:
* toutes les pins de meme coordonnee seront effacees.
* toutes les pins de meme coordonnee seront effacees.
* Sinon seule la pin de l'unite en convert courante sera effacee
* Sinon seule la pin de l'unite en convert courante sera effacee
*/
*/
...
@@ -528,10 +513,10 @@ void WinEDA_LibeditFrame::DeletePin( wxDC* DC,
...
@@ -528,10 +513,10 @@ void WinEDA_LibeditFrame::DeletePin( wxDC* DC,
return
;
return
;
PinPos
=
Pin
->
m_Pos
;
PinPos
=
Pin
->
m_Pos
;
DeleteOneLibraryDrawStruct
(
DrawPanel
,
DC
,
LibEntry
,
Pin
,
TRUE
);
DeleteOneLibraryDrawStruct
(
DrawPanel
,
DC
,
LibEntry
,
Pin
,
true
);
/* Effacement des autres pins de meme coordonnees */
/* Effacement des autres pins de meme coordonnees */
if
(
g_EditPinByPinIsOn
==
FALSE
)
if
(
g_EditPinByPinIsOn
==
false
)
{
{
DrawItem
=
LibEntry
->
m_Drawings
;
DrawItem
=
LibEntry
->
m_Drawings
;
for
(
;
DrawItem
!=
NULL
;
)
for
(
;
DrawItem
!=
NULL
;
)
...
@@ -578,7 +563,7 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
...
@@ -578,7 +563,7 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
CurrentPin
->
m_Convert
=
CurrentConvert
;
CurrentPin
->
m_Convert
=
CurrentConvert
;
/* Marquage des pins a traiter */
/* Marquage des pins a traiter */
if
(
g_EditPinByPinIsOn
==
FALSE
)
if
(
g_EditPinByPinIsOn
==
false
)
CurrentPin
->
m_Flags
|=
IS_LINKED
;
CurrentPin
->
m_Flags
|=
IS_LINKED
;
CurrentPin
->
m_Pos
.
x
=
GetScreen
()
->
m_Curseur
.
x
;
CurrentPin
->
m_Pos
.
x
=
GetScreen
()
->
m_Curseur
.
x
;
...
@@ -610,10 +595,10 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
...
@@ -610,10 +595,10 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
DrawLibraryDrawStruct
(
DrawPanel
,
DC
,
CurrentLibEntry
,
DrawLibraryDrawStruct
(
DrawPanel
,
DC
,
CurrentLibEntry
,
wxPoint
(
0
,
0
),
CurrentPin
,
g_XorMode
);
wxPoint
(
0
,
0
),
CurrentPin
,
g_XorMode
);
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
DrawPanel
->
m_IgnoreMouseEvents
=
true
;
InstallPineditFrame
(
this
,
DC
,
wxPoint
(
-
1
,
-
1
)
);
InstallPineditFrame
(
this
,
DC
,
wxPoint
(
-
1
,
-
1
)
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
DrawPanel
->
m_IgnoreMouseEvents
=
false
;
PinPreviousPos
=
CurrentPin
->
m_Pos
;
PinPreviousPos
=
CurrentPin
->
m_Pos
;
...
@@ -630,15 +615,15 @@ void WinEDA_PinPropertiesFrame::SetAttributsPin( bool draw,
...
@@ -630,15 +615,15 @@ void WinEDA_PinPropertiesFrame::SetAttributsPin( bool draw,
bool
unit
,
bool
convert
)
bool
unit
,
bool
convert
)
/*********************************************************/
/*********************************************************/
/* si draw ==
TRUE
/* si draw ==
true
* - Ajuste le flag visible / invisible (.U.Pin.Flags bit 0 ) de la pin
* - Ajuste le flag visible / invisible (.U.Pin.Flags bit 0 ) de la pin
* editee
* editee
*
*
* si unit ==
TRUE
* si unit ==
true
* - Modifie l'attribut Commun / Particulier U.Pin.Unit = 0 ou Num Unite
* - Modifie l'attribut Commun / Particulier U.Pin.Unit = 0 ou Num Unite
* de la pin editee
* de la pin editee
*
*
* si convert ==
TRUE
* si convert ==
true
* - Modifie l'attribut Commun / Particulier U.Pin.Convert = 0 ou Num Unite
* - Modifie l'attribut Commun / Particulier U.Pin.Convert = 0 ou Num Unite
* de la pin editee
* de la pin editee
*
*
...
@@ -729,9 +714,10 @@ void WinEDA_PinPropertiesFrame::SetAttributsPin( bool draw,
...
@@ -729,9 +714,10 @@ void WinEDA_PinPropertiesFrame::SetAttributsPin( bool draw,
{
{
if
(
Pin
->
m_Flags
==
0
)
if
(
Pin
->
m_Flags
==
0
)
continue
;
continue
;
Pin
->
m_Attributs
&=
~
PINNOTDRAW
;
if
(
LastPinNoDraw
)
if
(
CurrentPin
->
m_Attributs
&
PINNOTDRAW
)
Pin
->
m_Attributs
|=
PINNOTDRAW
;
Pin
->
m_Attributs
|=
PINNOTDRAW
;
else
Pin
->
m_Attributs
&=
~
PINNOTDRAW
;
}
}
}
}
}
}
...
@@ -762,7 +748,7 @@ void WinEDA_PinPropertiesFrame::NewSizePin( int newsize )
...
@@ -762,7 +748,7 @@ void WinEDA_PinPropertiesFrame::NewSizePin( int newsize )
RefPin
=
Pin
;
RefPin
=
Pin
;
if
(
g_EditPinByPinIsOn
==
FALSE
)
if
(
g_EditPinByPinIsOn
==
false
)
{
{
Pin
=
(
LibDrawPin
*
)
CurrentLibEntry
->
m_Drawings
;
Pin
=
(
LibDrawPin
*
)
CurrentLibEntry
->
m_Drawings
;
for
(
;
Pin
!=
NULL
;
Pin
=
Pin
->
Next
()
)
for
(
;
Pin
!=
NULL
;
Pin
=
Pin
->
Next
()
)
...
@@ -788,17 +774,17 @@ static void CreateImagePins( LibDrawPin* Pin )
...
@@ -788,17 +774,17 @@ static void CreateImagePins( LibDrawPin* Pin )
* creation d'une pin
* creation d'une pin
*/
*/
{
{
int
ii
,
CreateConv
=
FALSE
;
int
ii
,
CreateConv
=
false
;
LibDrawPin
*
NewPin
;
LibDrawPin
*
NewPin
;
if
(
g_EditPinByPinIsOn
)
if
(
g_EditPinByPinIsOn
)
return
;
return
;
if
(
g_AsDeMorgan
&&
(
Pin
->
m_Convert
!=
0
)
)
if
(
g_AsDeMorgan
&&
(
Pin
->
m_Convert
!=
0
)
)
CreateConv
=
TRUE
;
CreateConv
=
true
;
/* Creation de la pin " convert " pour la part courante */
/* Creation de la pin " convert " pour la part courante */
if
(
CreateConv
==
TRUE
)
if
(
CreateConv
==
true
)
{
{
NewPin
=
Pin
->
GenCopy
();
NewPin
=
Pin
->
GenCopy
();
if
(
Pin
->
m_Convert
>
1
)
if
(
Pin
->
m_Convert
>
1
)
...
@@ -825,7 +811,7 @@ static void CreateImagePins( LibDrawPin* Pin )
...
@@ -825,7 +811,7 @@ static void CreateImagePins( LibDrawPin* Pin )
CurrentLibEntry
->
m_Drawings
=
NewPin
;
CurrentLibEntry
->
m_Drawings
=
NewPin
;
/* Creation pour la representation "Convert" */
/* Creation pour la representation "Convert" */
if
(
CreateConv
==
FALSE
)
if
(
CreateConv
==
false
)
continue
;
continue
;
NewPin
=
Pin
->
GenCopy
();
NewPin
=
Pin
->
GenCopy
();
...
@@ -927,7 +913,7 @@ void WinEDA_LibeditFrame::RepeatPinItem( wxDC* DC, LibDrawPin* SourcePin )
...
@@ -927,7 +913,7 @@ void WinEDA_LibeditFrame::RepeatPinItem( wxDC* DC, LibDrawPin* SourcePin )
CurrentDrawItem
=
Pin
;
CurrentDrawItem
=
Pin
;
/* Marquage des pins a traiter */
/* Marquage des pins a traiter */
if
(
g_EditPinByPinIsOn
==
FALSE
)
if
(
g_EditPinByPinIsOn
==
false
)
Pin
->
m_Flags
|=
IS_LINKED
;
Pin
->
m_Flags
|=
IS_LINKED
;
wxPoint
savepos
=
GetScreen
()
->
m_Curseur
;
wxPoint
savepos
=
GetScreen
()
->
m_Curseur
;
...
@@ -966,7 +952,7 @@ bool WinEDA_LibeditFrame::TestPins( EDA_LibComponentStruct* LibEntry )
...
@@ -966,7 +952,7 @@ bool WinEDA_LibeditFrame::TestPins( EDA_LibComponentStruct* LibEntry )
wxString
msg
;
wxString
msg
;
if
(
CurrentLibEntry
==
NULL
)
if
(
CurrentLibEntry
==
NULL
)
return
FALSE
;
return
false
;
// Construction de la liste des pins:
// Construction de la liste des pins:
Pin
=
(
LibDrawPin
*
)
CurrentLibEntry
->
m_Drawings
;
Pin
=
(
LibDrawPin
*
)
CurrentLibEntry
->
m_Drawings
;
...
@@ -1029,5 +1015,5 @@ bool WinEDA_LibeditFrame::TestPins( EDA_LibComponentStruct* LibEntry )
...
@@ -1029,5 +1015,5 @@ bool WinEDA_LibeditFrame::TestPins( EDA_LibComponentStruct* LibEntry )
}
}
free
(
PinList
);
free
(
PinList
);
return
error
?
TRUE
:
FALSE
;
return
error
?
true
:
false
;
}
}
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