chasing a bug
This commit is contained in:
parent
9200a9da7f
commit
628be5d1c1
|
@ -4,6 +4,15 @@ 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.
|
||||||
|
|
||||||
|
|
||||||
|
2007-Dec-4 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||||
|
================================================================================
|
||||||
|
+pcbnew
|
||||||
|
added the D() macro to fctsys.h to ease conditional debug printf()s.
|
||||||
|
worked on http://sourceforge.net/tracker/index.php?func=detail&aid=1844960&group_id=145591&atid=762476
|
||||||
|
but could not resolve it in 1/2 day.
|
||||||
|
|
||||||
|
|
||||||
2007-Dec-4 UPDATE Dick Hollenbeck <dick@softplc.com>
|
2007-Dec-4 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||||
================================================================================
|
================================================================================
|
||||||
+pcbnew
|
+pcbnew
|
||||||
|
|
|
@ -112,6 +112,9 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
|
||||||
{
|
{
|
||||||
wxPoint curpos;
|
wxPoint curpos;
|
||||||
|
|
||||||
|
D(printf("curpos=%d,%d GetZoom=%d, mDrawOrg=%d,%d\n",
|
||||||
|
curpos.x, curpos.y, GetZoom(), m_DrawOrg.x, m_DrawOrg.y );)
|
||||||
|
|
||||||
curpos.x = ScreenPos.x * GetZoom();
|
curpos.x = ScreenPos.x * GetZoom();
|
||||||
curpos.y = ScreenPos.y * GetZoom();
|
curpos.y = ScreenPos.y * GetZoom();
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,13 @@
|
||||||
#define STRING_DIR_SEP wxT( "/" )
|
#define STRING_DIR_SEP wxT( "/" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#define D(x) x
|
||||||
|
#else
|
||||||
|
#define D(x) // nothing
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define UNIX_STRING_DIR_SEP wxT( "/" )
|
#define UNIX_STRING_DIR_SEP wxT( "/" )
|
||||||
#define WIN_STRING_DIR_SEP wxT( "\\" )
|
#define WIN_STRING_DIR_SEP wxT( "\\" )
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
MAKEGTK = $(MAKE) -f makefile.gtk
|
MAKEGTK = $(MAKE) -f makefile.gtk
|
||||||
KICAD_SUBDIRS = common 3d-viewer pcbnew eeschema eeschema/plugins cvpcb kicad gerbview
|
KICAD_SUBDIRS = common 3d-viewer pcbnew #eeschema eeschema/plugins cvpcb kicad gerbview
|
||||||
KICAD_SUBDIRS_BIN = eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
|
KICAD_SUBDIRS_BIN = eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
|
||||||
KICAD_SUBDIRS_RES = internat modules template library
|
KICAD_SUBDIRS_RES = internat modules template library
|
||||||
KICAD_SUBDIRS_HELP = help
|
KICAD_SUBDIRS_HELP = help
|
||||||
|
|
|
@ -119,6 +119,9 @@ void WinEDA_BasePcbFrame::CursorGoto( const wxPoint& aPos )
|
||||||
DrawPanel->MouseToCursorSchema();
|
DrawPanel->MouseToCursorSchema();
|
||||||
DrawPanel->CursorOn( &dc );
|
DrawPanel->CursorOn( &dc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
D(printf("CursorGoto end x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,9 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
|
||||||
void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
{
|
{
|
||||||
|
D(printf("GeneralControle x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
|
|
||||||
wxSize delta;
|
wxSize delta;
|
||||||
int zoom = GetScreen()->GetZoom();
|
int zoom = GetScreen()->GetZoom();
|
||||||
wxPoint curpos, oldpos;
|
wxPoint curpos, oldpos;
|
||||||
|
@ -256,8 +259,13 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
SetTitle( GetScreen()->m_FileName );
|
SetTitle( GetScreen()->m_FileName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
D(printf("GeneralControleA Mouse.x=%d, Mouse.y=%d\n",
|
||||||
|
Mouse.x, Mouse.y );)
|
||||||
|
|
||||||
curpos = DrawPanel->CursorRealPosition( Mouse );
|
curpos = DrawPanel->CursorRealPosition( Mouse );
|
||||||
|
|
||||||
|
D(printf("GeneralControleB curpos.x=%d, curpos.y=%d\n", curpos.x, curpos.y );)
|
||||||
|
|
||||||
oldpos = GetScreen()->m_Curseur;
|
oldpos = GetScreen()->m_Curseur;
|
||||||
|
|
||||||
delta.x = (int) round( (double) GetScreen()->GetGrid().x / zoom );
|
delta.x = (int) round( (double) GetScreen()->GetGrid().x / zoom );
|
||||||
|
@ -273,6 +281,7 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
delta.x, delta.y, GetScreen()->GetGrid().x, GetScreen()->GetGrid().y, zoom );
|
delta.x, delta.y, GetScreen()->GetGrid().x, GetScreen()->GetGrid().y, zoom );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
switch( g_KeyPressed )
|
switch( g_KeyPressed )
|
||||||
{
|
{
|
||||||
case EDA_PANNING_UP_KEY:
|
case EDA_PANNING_UP_KEY:
|
||||||
|
@ -339,9 +348,16 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
D(printf("GeneralControle2 x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
|
|
||||||
/* Put cursor in new position, according to the zoom keys (if any) */
|
/* Put cursor in new position, according to the zoom keys (if any) */
|
||||||
GetScreen()->m_Curseur = curpos;
|
GetScreen()->m_Curseur = curpos;
|
||||||
|
|
||||||
|
D(printf("GeneralControle3 x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
|
|
||||||
|
|
||||||
/* Put cursor on grid or a pad centre if requested
|
/* Put cursor on grid or a pad centre if requested
|
||||||
* But if the tool DELETE is active the cursor is left off grid
|
* But if the tool DELETE is active the cursor is left off grid
|
||||||
* this is better to reach items to delete off grid
|
* this is better to reach items to delete off grid
|
||||||
|
@ -383,7 +399,9 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
|
|
||||||
// If we are not in delete function, put cursor on grid
|
// If we are not in delete function, put cursor on grid
|
||||||
if( keep_on_grid )
|
if( keep_on_grid )
|
||||||
|
{
|
||||||
PutOnGrid( &GetScreen()->m_Curseur );
|
PutOnGrid( &GetScreen()->m_Curseur );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -884,8 +884,6 @@ void DrcDialog::OnPopupMenu( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int source = event.GetId();
|
int source = event.GetId();
|
||||||
|
|
||||||
printf( "source=%d\n", source );
|
|
||||||
|
|
||||||
const DRC_ITEM* item = 0;
|
const DRC_ITEM* item = 0;
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
|
|
||||||
|
|
|
@ -584,6 +584,9 @@ void WinEDA_DrawFrame::OnZoom( int zoom_type )
|
||||||
* replacé au centre de l'ecran
|
* replacé au centre de l'ecran
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
D(printf("OnZoom x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
|
|
||||||
if( DrawPanel == NULL )
|
if( DrawPanel == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -604,7 +607,9 @@ void WinEDA_DrawFrame::OnZoom( int zoom_type )
|
||||||
case ID_ZOOM_PLUS_BUTT:
|
case ID_ZOOM_PLUS_BUTT:
|
||||||
if( zoom_type == ID_ZOOM_PLUS_BUTT )
|
if( zoom_type == ID_ZOOM_PLUS_BUTT )
|
||||||
m_CurrentScreen->m_Curseur = DrawPanel->GetScreenCenterRealPosition();
|
m_CurrentScreen->m_Curseur = DrawPanel->GetScreenCenterRealPosition();
|
||||||
|
|
||||||
m_CurrentScreen->SetPreviousZoom();
|
m_CurrentScreen->SetPreviousZoom();
|
||||||
|
|
||||||
Recadre_Trace( move_mouse_cursor );
|
Recadre_Trace( move_mouse_cursor );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -47,13 +47,22 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PutOnGrid( &m_CurrentScreen->m_Curseur );
|
PutOnGrid( &m_CurrentScreen->m_Curseur );
|
||||||
|
|
||||||
AdjustScrollBars();
|
AdjustScrollBars();
|
||||||
|
|
||||||
ReDrawPanel();
|
ReDrawPanel();
|
||||||
|
|
||||||
|
D(printf("~ReDrawPanel x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
|
|
||||||
/* Move the mouse cursor to the on grid graphic cursor position */
|
/* Move the mouse cursor to the on grid graphic cursor position */
|
||||||
if( ToMouse == TRUE )
|
if( ToMouse == TRUE )
|
||||||
|
{
|
||||||
DrawPanel->MouseToCursorSchema();
|
DrawPanel->MouseToCursorSchema();
|
||||||
|
|
||||||
|
D(printf("~MouseToCursorSchema x=%d, y=%d\n",
|
||||||
|
m_CurrentScreen->m_Curseur.x, m_CurrentScreen->m_Curseur.y );)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
8
todo.txt
8
todo.txt
|
@ -70,3 +70,11 @@ asked by: Dick Hollenbeck
|
||||||
asked by: jp Charras
|
asked by: jp Charras
|
||||||
================================================================================
|
================================================================================
|
||||||
Use the collector classes in eeschema.
|
Use the collector classes in eeschema.
|
||||||
|
|
||||||
|
|
||||||
|
2007-Dec-5 Assigned To: charras
|
||||||
|
asked by: Dick
|
||||||
|
================================================================================
|
||||||
|
http://sourceforge.net/tracker/index.php?func=detail&aid=1844960&group_id=145591&atid=762476
|
||||||
|
Notice my appended note to this bug report as well.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue