Commit 31e58d87 authored by jean-pierre charras's avatar jean-pierre charras

Eeschema: fix an old bug: sometimes E hotkey (and some other' hot keys) was...

Eeschema: fix an old bug: sometimes E hotkey (and some other' hot keys)  was editing a previously selected item, not the item under the mouse cursor
Templates: remove useless backup files
parent dd519d68
......@@ -132,8 +132,6 @@ bool EDA_APP::OnInit()
/* Load file specified in the command line. */
if( filename.IsOk() )
{
wxLogDebug( wxT( "Loading schematic file " ) + filename.GetFullPath() );
if( filename.GetExt() != SchematicFileExtension )
filename.SetExt( SchematicFileExtension );
......
......@@ -19,6 +19,7 @@ class TRANSFORM;
#define SCHEMATIC_HEAD_STRING "Schematic File Version"
#define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers.
#define DEFAULT_TEXT_SIZE 50 /* Default size for field texts */
#define GR_DEFAULT_DRAWMODE GR_COPY
......
......@@ -492,6 +492,11 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
case HK_EDIT_COMPONENT_VALUE: // Edit component value field.
case HK_EDIT_COMPONENT_FOOTPRINT: // Edit component footprint field.
{
// force a new item search on hot keys at current position,
// if there is no currently edited item,
// to avoid using a previously selected item
if( ! itemInEdit )
screen->SetCurItem( NULL );
EDA_HOTKEY_CLIENT_DATA data( aPosition );
cmd.SetInt( hotKey->m_Idcommand );
cmd.SetClientObject( &data );
......
......@@ -96,8 +96,8 @@ SEARCH_RESULT LIB_COLLECTOR::Inspect( EDA_ITEM* aItem, const void* aTestData )
{
LIB_ITEM* item = (LIB_ITEM*) aItem;
wxLogDebug( wxT( "Inspecting item %s, unit %d, convert %d" ),
GetChars( item->GetSelectMenuText() ), item->GetUnit(), item->GetConvert() );
// wxLogDebug( wxT( "Inspecting item %s, unit %d, convert %d" ),
// GetChars( item->GetSelectMenuText() ), item->GetUnit(), item->GetConvert() );
if( ( m_data.m_unit && item->GetUnit() && ( m_data.m_unit != item->GetUnit() ) )
|| ( m_data.m_convert && item->GetConvert() && ( m_data.m_convert != item->GetConvert() ) )
......
......@@ -31,13 +31,7 @@
#include <lib_draw_item.h>
#define TARGET_PIN_RADIUS 12 /* Circle diameter drawn at the active end of pins */
#define DEFAULT_TEXT_SIZE 50 /* Default size for field texts */
#define PART_NAME_LEN 15 /* Maximum length of part name. */
#define PREFIX_NAME_LEN 5 /* Maximum length of prefix (IC, R, SW etc.). */
#define PIN_WIDTH 100 /* Width between 2 pins in internal units. */
#define PIN_LENGTH 300 /* Default Length of each pin to be drawn. */
#if defined(KICAD_GOST)
......
......@@ -28,8 +28,6 @@
*/
#include <fctsys.h>
#include <gr_basic.h>
#include <macros.h>
#include <class_drawpanel.h>
#include <drawtxt.h>
#include <trigo.h>
......@@ -39,7 +37,6 @@
#include <kicad_string.h>
#include <general.h>
#include <protos.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <sch_component.h>
......@@ -53,7 +50,7 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
m_pos = pos;
m_size = wxSize( MIN_SHEET_WIDTH, MIN_SHEET_HEIGHT );
SetTimeStamp( GetNewTimeStamp() );
m_sheetNameSize = m_fileNameSize = 60;
m_sheetNameSize = m_fileNameSize = DEFAULT_TEXT_SIZE;
m_screen = NULL;
m_name.Printf( wxT( "Sheet%8.8lX" ), m_TimeStamp );
m_fileName.Printf( wxT( "file%8.8lX.sch" ), m_TimeStamp );
......@@ -84,7 +81,7 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) :
SCH_SHEET::~SCH_SHEET()
{
wxLogDebug( wxT( "Destroying sheet " ) + m_name );
// wxLogDebug( wxT( "Destroying sheet " ) + m_name );
// also, look at the associated sheet & its reference count
// perhaps it should be deleted also.
......
EESchema-DOCLIB Version 2.0 Date: Thu 18 Oct 2012 09:37:16 PM PDT
#
#End Doc Library
This diff is collapsed.
EESchema-DOCLIB Version 2.0 Date: Thu 18 Oct 2012 09:37:16 PM PDT
#
#End Doc Library
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