Commit ebeb2363 authored by charras's avatar charras

eeschema: libedit changes (see changelog)

parent 18b8932b
......@@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Aug-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
libedit:
solved : a bug which can crash eeschema on a double click.
modified : pin lenght edit in pin edit dialog. The value (handle by spin control) was not editable with recent wxWidgets versions
2008-Aug-09 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
......
......@@ -179,11 +179,9 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
/*************************************************************************/
/* Appel� sur un double click:
* pour un �l�ment editable (textes, composant):
* appel de l'editeur correspondant.
* pour une connexion en cours:
* termine la connexion
/* Called on a double click:
* If an editable item (field, pin, graphic):
* Call the suitable dialog editor.
*/
{
wxPoint pos = GetPosition();
......@@ -192,9 +190,8 @@ void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if( CurrentLibEntry == NULL )
return;
if( !m_ID_current_state // Simple localisation des elements
|| (DrawEntry == NULL) || (DrawEntry->m_Flags == 0) )
{
if( (DrawEntry == NULL) || (DrawEntry->m_Flags == 0) )
{ // We can locate an item
DrawEntry = LocatePin( GetScreen()->m_MousePosition, CurrentLibEntry,
CurrentUnit, CurrentConvert );
if( DrawEntry == NULL )
......
This diff is collapsed.
......@@ -33,7 +33,7 @@
#include "protos.h"
////@begin includes
#include "wx/spinctrl.h"
#include "wx/spinbutt.h"
////@end includes
/*!
......@@ -41,7 +41,7 @@
*/
////@begin forward declarations
class wxSpinCtrl;
class wxSpinButton;
////@end forward declarations
/*!
......@@ -50,14 +50,15 @@ class wxSpinCtrl;
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_TEXTCTRL 10001
#define ID_TEXTCTRL1 10002
#define ID_SPINCTRL 10003
#define ID_CHECKBOX 10004
#define ID_CHECKBOX1 10005
#define ID_CHECKBOX2 10006
#define ID_TEXTCTRL2 10007
#define ID_TEXTCTRL3 10008
#define ID_TEXTCTRL_PINNAME 10001
#define ID_TEXTCTRL_PINNUM 10002
#define ID_TEXTCTRL_PINSIZE 10003
#define ID_SPINBUTTON_INC_DEC_PINSIZE 10010
#define ID_CHECKBOX_COMMON_UNITS 10004
#define ID_CHECKBOX_COMMON_CONVERT 10005
#define ID_CHECKBOX_NOT_DRAWN 10006
#define ID_TEXTCTRL_PINNAME_SIZE 10007
#define ID_TEXTCTRL_PINNUM_SIZE 10008
#define ID_RADIOBOX 10009
#define ID_RADIOBOX1 10012
#define ID_RADIOBOX2 10013
......@@ -98,6 +99,12 @@ public:
////@begin WinEDA_PinPropertiesFrame event handler declarations
/// wxEVT_SCROLL_LINEUP event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
void OnSpinbuttonIncDecPinsizeUp( wxSpinEvent& event );
/// wxEVT_SCROLL_LINEDOWN event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
void OnSpinbuttonIncDecPinsizeDown( wxSpinEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
......@@ -118,6 +125,7 @@ public:
/// Should we show tooltips?
static bool ShowToolTips();
void SetValuesInDialog(void);
void PinPropertiesAccept(wxCommandEvent& event);
void SetPinName(const wxString & newname, int newsize);
void SetPinNum(const wxString & newnum, int newsize);
......@@ -130,7 +138,9 @@ public:
////@begin WinEDA_PinPropertiesFrame member variables
wxTextCtrl* m_PinNameCtrl;
wxTextCtrl* m_PinNumCtrl;
wxSpinCtrl* m_PinSize;
wxTextCtrl* m_PinSizeCtrl;
wxSpinButton* m_PinSizeIncDecButton;
wxStaticText* m_PinSizeText;
wxCheckBox* m_CommonUnit;
wxCheckBox* m_CommonConvert;
wxCheckBox* m_NoDraw;
......
This diff is collapsed.
......@@ -66,9 +66,13 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
LastPinCommonConvert = m_CommonConvert->GetValue();
LastPinCommonUnit = m_CommonUnit->GetValue();
LastPinNoDraw = m_NoDraw->GetValue();
LastPinSize = m_PinSize->GetValue();
msg = m_PinSizeCtrl->GetValue();
LastPinSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
msg = m_PinNameSizeCtrl->GetValue();
LastPinNameSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
msg = m_PinNumSizeCtrl->GetValue();
LastPinNumSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
......@@ -113,7 +117,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
void WinEDA_LibeditFrame::InitEditOnePin()
/*********************************************/
/* Routine d'installation du menu d'edition d'une pin
/* Called when installing the edit pin dialog frame
* Set pins flags (.m_Flags pins member) to ensure a correctins edition:
* If 2 or more pins are on the same location (and the same orientation) they are all moved or resized.
* This is usefull for components which have more than one part per package
* In this case all parts can be edited at once.
* Note: if the option "Edit Pin per Pin" (tool of the main toolbar) is activated, only the current part is edited
*/
{
LibDrawPin* Pin;
......@@ -135,7 +144,8 @@ 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) )
&& (g_EditPinByPinIsOn == FALSE) // This is set by the tool of the main toolbar
)
Pin->m_Flags |= IS_LINKED | IN_EDIT;
else
Pin->m_Flags = 0;
......
......@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h"
(wxT(KICAD_SVN_VERSION))
# else
(wxT("(20080731.r1175"))
(wxT("(20080811.r1188)"))
# endif
#endif
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment