Commit ebeb2363 authored by charras's avatar charras

eeschema: libedit changes (see changelog)

parent 18b8932b
...@@ -5,6 +5,13 @@ Started 2007-June-11 ...@@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. 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> 2008-Aug-09 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew: +pcbnew:
......
...@@ -139,7 +139,7 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -139,7 +139,7 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
CurrentUnit, CurrentConvert ); CurrentUnit, CurrentConvert );
if( DrawEntry == NULL ) if( DrawEntry == NULL )
{ {
DrawEntry = LocateDrawItem( (SCH_SCREEN*)GetScreen(), DrawEntry = LocateDrawItem( (SCH_SCREEN*)GetScreen(),
GetScreen()->m_Curseur, GetScreen()->m_Curseur,
CurrentLibEntry, CurrentUnit, CurrentLibEntry, CurrentUnit,
CurrentConvert, LOCATE_ALL_DRAW_ITEM ); CurrentConvert, LOCATE_ALL_DRAW_ITEM );
...@@ -179,11 +179,9 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -179,11 +179,9 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
/*************************************************************************/ /*************************************************************************/
/* Appel� sur un double click: /* Called on a double click:
* pour un �l�ment editable (textes, composant): * If an editable item (field, pin, graphic):
* appel de l'editeur correspondant. * Call the suitable dialog editor.
* pour une connexion en cours:
* termine la connexion
*/ */
{ {
wxPoint pos = GetPosition(); wxPoint pos = GetPosition();
...@@ -192,9 +190,8 @@ void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -192,9 +190,8 @@ void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if( CurrentLibEntry == NULL ) if( CurrentLibEntry == NULL )
return; return;
if( !m_ID_current_state // Simple localisation des elements if( (DrawEntry == NULL) || (DrawEntry->m_Flags == 0) )
|| (DrawEntry == NULL) || (DrawEntry->m_Flags == 0) ) { // We can locate an item
{
DrawEntry = LocatePin( GetScreen()->m_MousePosition, CurrentLibEntry, DrawEntry = LocatePin( GetScreen()->m_MousePosition, CurrentLibEntry,
CurrentUnit, CurrentConvert ); CurrentUnit, CurrentConvert );
if( DrawEntry == NULL ) if( DrawEntry == NULL )
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: pinedit-dialog.h // Name: pinedit-dialog.h
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 11/02/2006 13:30:59 // Created: 11/02/2006 13:30:59
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59 // Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "protos.h" #include "protos.h"
////@begin includes ////@begin includes
#include "wx/spinctrl.h" #include "wx/spinbutt.h"
////@end includes ////@end includes
/*! /*!
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
*/ */
////@begin forward declarations ////@begin forward declarations
class wxSpinCtrl; class wxSpinButton;
////@end forward declarations ////@end forward declarations
/*! /*!
...@@ -50,14 +50,15 @@ class wxSpinCtrl; ...@@ -50,14 +50,15 @@ class wxSpinCtrl;
////@begin control identifiers ////@begin control identifiers
#define ID_DIALOG 10000 #define ID_DIALOG 10000
#define ID_TEXTCTRL 10001 #define ID_TEXTCTRL_PINNAME 10001
#define ID_TEXTCTRL1 10002 #define ID_TEXTCTRL_PINNUM 10002
#define ID_SPINCTRL 10003 #define ID_TEXTCTRL_PINSIZE 10003
#define ID_CHECKBOX 10004 #define ID_SPINBUTTON_INC_DEC_PINSIZE 10010
#define ID_CHECKBOX1 10005 #define ID_CHECKBOX_COMMON_UNITS 10004
#define ID_CHECKBOX2 10006 #define ID_CHECKBOX_COMMON_CONVERT 10005
#define ID_TEXTCTRL2 10007 #define ID_CHECKBOX_NOT_DRAWN 10006
#define ID_TEXTCTRL3 10008 #define ID_TEXTCTRL_PINNAME_SIZE 10007
#define ID_TEXTCTRL_PINNUM_SIZE 10008
#define ID_RADIOBOX 10009 #define ID_RADIOBOX 10009
#define ID_RADIOBOX1 10012 #define ID_RADIOBOX1 10012
#define ID_RADIOBOX2 10013 #define ID_RADIOBOX2 10013
...@@ -81,7 +82,7 @@ class wxSpinCtrl; ...@@ -81,7 +82,7 @@ class wxSpinCtrl;
*/ */
class WinEDA_PinPropertiesFrame: public wxDialog class WinEDA_PinPropertiesFrame: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS( WinEDA_PinPropertiesFrame ) DECLARE_DYNAMIC_CLASS( WinEDA_PinPropertiesFrame )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
...@@ -98,6 +99,12 @@ public: ...@@ -98,6 +99,12 @@ public:
////@begin WinEDA_PinPropertiesFrame event handler declarations ////@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 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
...@@ -118,6 +125,7 @@ public: ...@@ -118,6 +125,7 @@ public:
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips(); static bool ShowToolTips();
void SetValuesInDialog(void);
void PinPropertiesAccept(wxCommandEvent& event); void PinPropertiesAccept(wxCommandEvent& event);
void SetPinName(const wxString & newname, int newsize); void SetPinName(const wxString & newname, int newsize);
void SetPinNum(const wxString & newnum, int newsize); void SetPinNum(const wxString & newnum, int newsize);
...@@ -130,7 +138,9 @@ public: ...@@ -130,7 +138,9 @@ public:
////@begin WinEDA_PinPropertiesFrame member variables ////@begin WinEDA_PinPropertiesFrame member variables
wxTextCtrl* m_PinNameCtrl; wxTextCtrl* m_PinNameCtrl;
wxTextCtrl* m_PinNumCtrl; wxTextCtrl* m_PinNumCtrl;
wxSpinCtrl* m_PinSize; wxTextCtrl* m_PinSizeCtrl;
wxSpinButton* m_PinSizeIncDecButton;
wxStaticText* m_PinSizeText;
wxCheckBox* m_CommonUnit; wxCheckBox* m_CommonUnit;
wxCheckBox* m_CommonConvert; wxCheckBox* m_CommonConvert;
wxCheckBox* m_NoDraw; wxCheckBox* m_NoDraw;
......
This diff is collapsed.
...@@ -66,9 +66,13 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event ) ...@@ -66,9 +66,13 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
LastPinCommonConvert = m_CommonConvert->GetValue(); LastPinCommonConvert = m_CommonConvert->GetValue();
LastPinCommonUnit = m_CommonUnit->GetValue(); LastPinCommonUnit = m_CommonUnit->GetValue();
LastPinNoDraw = m_NoDraw->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(); msg = m_PinNameSizeCtrl->GetValue();
LastPinNameSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits ); LastPinNameSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
msg = m_PinNumSizeCtrl->GetValue(); msg = m_PinNumSizeCtrl->GetValue();
LastPinNumSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits ); LastPinNumSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
...@@ -113,7 +117,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event ) ...@@ -113,7 +117,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
void WinEDA_LibeditFrame::InitEditOnePin() 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; LibDrawPin* Pin;
...@@ -135,7 +144,8 @@ void WinEDA_LibeditFrame::InitEditOnePin() ...@@ -135,7 +144,8 @@ 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) ) && (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
Pin->m_Flags = 0; Pin->m_Flags = 0;
......
...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion ...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h" # include "config.h"
(wxT(KICAD_SVN_VERSION)) (wxT(KICAD_SVN_VERSION))
# else # else
(wxT("(20080731.r1175")) (wxT("(20080811.r1188)"))
# endif # endif
#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