fixed a minor bud in pinedit. COMPILING.txt updated

This commit is contained in:
charras 2009-05-09 17:29:48 +00:00
parent 56b8789798
commit 4757c175e3
2 changed files with 54 additions and 65 deletions

View File

@ -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.
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
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.
-----------------------------------------------------------------------------
7) Install Boost C++ Libraries
If windows, well I'm guessing, so somebody please try these two options and
correct this text please according to which ever is easier:
(optionA) Go to http://sourceforge.net/project/showfiles.php?group_id=7586
and download boost_1_34_1.zip or later and unzip it so as to put the files
into C:\Program Files\boost\boost_1_34_1
(optionB)
Go to http://www.boost-consulting.com/products/free
and download the http://www.boost-consulting.com/boost_1_34_1_setup.exe
file and run it.
Under linux, boost is already installed, but can be too old.
If this is the case, you *must* update boost.
Go to http://www.boost.org/ dowlload the latest version of boost.
unzip (or untar) boots file.
under Windows, files can be installed (unzipped) everywhere, but when create makefiles using cmake,
you will have a message saying boost is not found, something like:
-- Check for installed Boost -- not found
CMake Error at CMakeModules/CheckFindPackageResult.cmake:6 (message):
Boost was not found - it is required to build Kicad
Edit the CMakeCache.txt file to replace the Boost_INCLUDE_DIR "notfound" value by the right value:
You must find a line like
//Path to a file.
Boost_INCLUDE_DIR:PATH=Boost_INCLUDE_DIR-NOTFOUND
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)
If linux, and using a GCC earlier than 4.2, then install the
"Boost C++ Libraries development files" or similarly named package using your
package manager. Note that if you are using gcc 4.2 or later, there were
incompatibilities that exist between boost 1.34.1 and gcc 4.2. So in this case,
instead of installing boost using your package manager, you should use the svn
HEAD copy which overcomes the gcc 4.2 incompatibility, specifically with
<boost/ptr_container/ptr_vector.hpp>.
-----------------------------------------------------------------------------

View File

@ -44,9 +44,9 @@ static int LastPinType = PIN_INPUT,
LastPinSize = 300,
LastPinNameSize = 50,
LastPinNumSize = 50,
LastPinCommonConvert = FALSE,
LastPinCommonUnit = FALSE,
LastPinNoDraw = FALSE;
LastPinCommonConvert = false,
LastPinCommonUnit = false,
LastPinNoDraw = false;
#include "pinedit-dialog.cpp"
@ -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
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 );
msg = m_PinNumCtrl->GetValue(); if( msg.IsEmpty() )
@ -98,18 +89,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
SetPinShape( LastPinShape );
SetPinType( LastPinType );
SetPinOrient( LastPinOrient );
SetAttributsPin( TRUE, TRUE, TRUE );
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 );
SetAttributsPin( true, true, true ); // Set all attributes (visibility, common to units and common to convert options)
CurrentDrawItem->DisplayInfo( m_Parent );
}
if( CurrentDrawItem )
CurrentDrawItem->DisplayInfo( m_Parent );
Close();
m_Parent->DrawPanel->Refresh();
}
@ -144,7 +129,7 @@ void WinEDA_LibeditFrame::InitEditOnePin()
if( (Pin->m_Pos == CurrentPin->m_Pos)
&& (Pin->m_Orient == CurrentPin->m_Orient)
&& ( !(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;
else
@ -165,7 +150,7 @@ static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC )
LibDrawPin* CurrentPin = (LibDrawPin*) CurrentDrawItem;
if( CurrentPin && ( CurrentPin->m_Flags & IS_NEW ) )
DeleteOneLibraryDrawStruct( Panel, DC, CurrentLibEntry, CurrentPin, TRUE );
DeleteOneLibraryDrawStruct( Panel, DC, CurrentLibEntry, CurrentPin, true );
/* clear edit flags */
LibEDA_BaseStruct* item = CurrentLibEntry->m_Drawings;
@ -187,7 +172,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
{
LibDrawPin* Pin;
LibDrawPin* CurrentPin = (LibDrawPin*) CurrentDrawItem;
bool ask_for_pin = TRUE;
bool ask_for_pin = true;
wxPoint newpos;
bool status;
@ -212,14 +197,14 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
continue;
if( ask_for_pin )
{
DrawPanel->m_IgnoreMouseEvents = TRUE;
DrawPanel->m_IgnoreMouseEvents = true;
status = IsOK( this, _( "Occupied by other pin. Continue?" ) );
DrawPanel->MouseToCursorSchema();
DrawPanel->m_IgnoreMouseEvents = FALSE;
DrawPanel->m_IgnoreMouseEvents = false;
if( !status )
return;
else
ask_for_pin = FALSE;
ask_for_pin = false;
}
}
@ -310,7 +295,7 @@ void WinEDA_LibeditFrame::StartMovePin( wxDC* DC )
if( Pin == CurrentPin )
continue;
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;
}
@ -514,7 +499,7 @@ void WinEDA_LibeditFrame::DeletePin( wxDC* DC,
/*************************************************/
/* 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.
* Sinon seule la pin de l'unite en convert courante sera effacee
*/
@ -528,10 +513,10 @@ void WinEDA_LibeditFrame::DeletePin( wxDC* DC,
return;
PinPos = Pin->m_Pos;
DeleteOneLibraryDrawStruct( DrawPanel, DC, LibEntry, Pin, TRUE );
DeleteOneLibraryDrawStruct( DrawPanel, DC, LibEntry, Pin, true );
/* Effacement des autres pins de meme coordonnees */
if( g_EditPinByPinIsOn == FALSE )
if( g_EditPinByPinIsOn == false )
{
DrawItem = LibEntry->m_Drawings;
for( ; DrawItem != NULL; )
@ -578,7 +563,7 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
CurrentPin->m_Convert = CurrentConvert;
/* Marquage des pins a traiter */
if( g_EditPinByPinIsOn == FALSE )
if( g_EditPinByPinIsOn == false )
CurrentPin->m_Flags |= IS_LINKED;
CurrentPin->m_Pos.x = GetScreen()->m_Curseur.x;
@ -610,10 +595,10 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
DrawLibraryDrawStruct( DrawPanel, DC, CurrentLibEntry,
wxPoint(0, 0), CurrentPin, g_XorMode );
DrawPanel->m_IgnoreMouseEvents = TRUE;
DrawPanel->m_IgnoreMouseEvents = true;
InstallPineditFrame( this, DC, wxPoint( -1, -1 ) );
DrawPanel->MouseToCursorSchema();
DrawPanel->m_IgnoreMouseEvents = FALSE;
DrawPanel->m_IgnoreMouseEvents = false;
PinPreviousPos = CurrentPin->m_Pos;
@ -630,15 +615,15 @@ void WinEDA_PinPropertiesFrame::SetAttributsPin( bool draw,
bool unit, bool convert )
/*********************************************************/
/* si draw == TRUE
/* si draw == true
* - Ajuste le flag visible / invisible (.U.Pin.Flags bit 0 ) de la pin
* editee
*
* si unit == TRUE
* si unit == true
* - Modifie l'attribut Commun / Particulier U.Pin.Unit = 0 ou Num Unite
* de la pin editee
*
* si convert == TRUE
* si convert == true
* - Modifie l'attribut Commun / Particulier U.Pin.Convert = 0 ou Num Unite
* de la pin editee
*
@ -729,9 +714,10 @@ void WinEDA_PinPropertiesFrame::SetAttributsPin( bool draw,
{
if( Pin->m_Flags == 0 )
continue;
Pin->m_Attributs &= ~PINNOTDRAW;
if( CurrentPin->m_Attributs & PINNOTDRAW )
if( LastPinNoDraw )
Pin->m_Attributs |= PINNOTDRAW;
else
Pin->m_Attributs &= ~PINNOTDRAW;
}
}
}
@ -762,7 +748,7 @@ void WinEDA_PinPropertiesFrame::NewSizePin( int newsize )
RefPin = Pin;
if( g_EditPinByPinIsOn == FALSE )
if( g_EditPinByPinIsOn == false )
{
Pin = (LibDrawPin*) CurrentLibEntry->m_Drawings;
for( ; Pin != NULL; Pin = Pin->Next() )
@ -788,17 +774,17 @@ static void CreateImagePins( LibDrawPin* Pin )
* creation d'une pin
*/
{
int ii, CreateConv = FALSE;
int ii, CreateConv = false;
LibDrawPin* NewPin;
if( g_EditPinByPinIsOn )
return;
if( g_AsDeMorgan && (Pin->m_Convert != 0 ) )
CreateConv = TRUE;
CreateConv = true;
/* Creation de la pin " convert " pour la part courante */
if( CreateConv == TRUE )
if( CreateConv == true )
{
NewPin = Pin->GenCopy();
if( Pin->m_Convert > 1 )
@ -825,7 +811,7 @@ static void CreateImagePins( LibDrawPin* Pin )
CurrentLibEntry->m_Drawings = NewPin;
/* Creation pour la representation "Convert" */
if( CreateConv == FALSE )
if( CreateConv == false )
continue;
NewPin = Pin->GenCopy();
@ -927,7 +913,7 @@ void WinEDA_LibeditFrame::RepeatPinItem( wxDC* DC, LibDrawPin* SourcePin )
CurrentDrawItem = Pin;
/* Marquage des pins a traiter */
if( g_EditPinByPinIsOn == FALSE )
if( g_EditPinByPinIsOn == false )
Pin->m_Flags |= IS_LINKED;
wxPoint savepos = GetScreen()->m_Curseur;
@ -966,7 +952,7 @@ bool WinEDA_LibeditFrame::TestPins( EDA_LibComponentStruct* LibEntry )
wxString msg;
if( CurrentLibEntry == NULL )
return FALSE;
return false;
// Construction de la liste des pins:
Pin = (LibDrawPin*) CurrentLibEntry->m_Drawings;
@ -1029,5 +1015,5 @@ bool WinEDA_LibeditFrame::TestPins( EDA_LibComponentStruct* LibEntry )
}
free( PinList );
return error ? TRUE : FALSE;
return error ? true : false;
}