todo.txt update
This commit is contained in:
parent
c931d47ad1
commit
8300fe1850
|
@ -37,8 +37,10 @@ BASE_SCREEN::~BASE_SCREEN()
|
||||||
{
|
{
|
||||||
if( m_ZoomList )
|
if( m_ZoomList )
|
||||||
free( m_ZoomList );
|
free( m_ZoomList );
|
||||||
|
|
||||||
if( m_GridList )
|
if( m_GridList )
|
||||||
free( m_GridList );
|
free( m_GridList );
|
||||||
|
|
||||||
ClearUndoRedoList();
|
ClearUndoRedoList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,9 +112,8 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
|
||||||
{
|
{
|
||||||
wxPoint curpos;
|
wxPoint curpos;
|
||||||
|
|
||||||
curpos.x = ScreenPos.x* GetZoom();
|
curpos.x = ScreenPos.x * GetZoom();
|
||||||
|
curpos.y = ScreenPos.y * GetZoom();
|
||||||
curpos.y = ScreenPos.y* GetZoom();
|
|
||||||
|
|
||||||
curpos.x += m_DrawOrg.x;
|
curpos.x += m_DrawOrg.x;
|
||||||
curpos.y += m_DrawOrg.y;
|
curpos.y += m_DrawOrg.y;
|
||||||
|
|
|
@ -319,14 +319,20 @@ void MARQUEUR::Display_Infos( WinEDA_DrawFrame* frame )
|
||||||
|
|
||||||
bool MARQUEUR::HitTest( const wxPoint& refPos )
|
bool MARQUEUR::HitTest( const wxPoint& refPos )
|
||||||
{
|
{
|
||||||
// currently the MARKER is about 14 pixels by 14 pixels
|
// the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
|
||||||
int xCenter = m_Pos.x + 7;
|
// as zoom changes, the effective real size of the MARKER changes.
|
||||||
int yCenter = m_Pos.y + 7;
|
|
||||||
|
// @todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
|
||||||
|
|
||||||
|
const int halfSize = 6;
|
||||||
|
|
||||||
|
int xCenter = m_Pos.x + halfSize;
|
||||||
|
int yCenter = m_Pos.y + halfSize;
|
||||||
|
|
||||||
int dx = refPos.x - xCenter;
|
int dx = refPos.x - xCenter;
|
||||||
int dy = refPos.y - yCenter;
|
int dy = refPos.y - yCenter;
|
||||||
|
|
||||||
if( ABS(dx) <= 7 && ABS(dy) <= 7 )
|
if( ABS(dx) <= halfSize && ABS(dy) <= halfSize )
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -195,9 +195,13 @@ wxPoint WinEDA_DrawPanel::CalcAbsolutePosition( const wxPoint& rel_pos )
|
||||||
CalcUnscrolledPosition( rel_pos.x, rel_pos.y, &pos.x, &pos.y );
|
CalcUnscrolledPosition( rel_pos.x, rel_pos.y, &pos.x, &pos.y );
|
||||||
#else
|
#else
|
||||||
int ii, jj;
|
int ii, jj;
|
||||||
|
|
||||||
GetViewStart( &pos.x, &pos.y );
|
GetViewStart( &pos.x, &pos.y );
|
||||||
GetScrollPixelsPerUnit( &ii, &jj );
|
GetScrollPixelsPerUnit( &ii, &jj );
|
||||||
pos.x *= ii; pos.y *= jj;
|
|
||||||
|
pos.x *= ii;
|
||||||
|
pos.y *= jj;
|
||||||
|
|
||||||
pos.x += rel_pos.x;
|
pos.x += rel_pos.x;
|
||||||
pos.y += rel_pos.y;
|
pos.y += rel_pos.y;
|
||||||
#endif
|
#endif
|
||||||
|
@ -243,11 +247,16 @@ bool WinEDA_DrawPanel::IsPointOnDisplay( wxPoint ref_pos )
|
||||||
|
|
||||||
// Conversion en coord physiques
|
// Conversion en coord physiques
|
||||||
pos = CalcAbsolutePosition( display_rect.GetPosition() );
|
pos = CalcAbsolutePosition( display_rect.GetPosition() );
|
||||||
|
|
||||||
pos.x *= GetZoom();
|
pos.x *= GetZoom();
|
||||||
pos.y *= GetZoom();
|
pos.y *= GetZoom();
|
||||||
|
|
||||||
pos.x += GetScreen()->m_DrawOrg.x;
|
pos.x += GetScreen()->m_DrawOrg.x;
|
||||||
pos.y += GetScreen()->m_DrawOrg.y;
|
pos.y += GetScreen()->m_DrawOrg.y;
|
||||||
display_rect.SetX( pos.x ); display_rect.SetY( pos.y );
|
|
||||||
|
display_rect.SetX( pos.x );
|
||||||
|
display_rect.SetY( pos.y );
|
||||||
|
|
||||||
display_rect.SetWidth( display_rect.GetWidth() * GetZoom() );
|
display_rect.SetWidth( display_rect.GetWidth() * GetZoom() );
|
||||||
display_rect.SetHeight( display_rect.GetHeight() * GetZoom() );
|
display_rect.SetHeight( display_rect.GetHeight() * GetZoom() );
|
||||||
|
|
||||||
|
@ -283,11 +292,15 @@ wxPoint WinEDA_DrawPanel::GetScreenCenterRealPosition()
|
||||||
wxPoint realpos;
|
wxPoint realpos;
|
||||||
|
|
||||||
size = GetClientSize();
|
size = GetClientSize();
|
||||||
size.x /= 2; size.y /= 2;
|
|
||||||
|
size.x /= 2;
|
||||||
|
size.y /= 2;
|
||||||
|
|
||||||
realpos = CalcAbsolutePosition( wxPoint( size.x, size.y ) );
|
realpos = CalcAbsolutePosition( wxPoint( size.x, size.y ) );
|
||||||
|
|
||||||
realpos.x *= GetZoom();
|
realpos.x *= GetZoom();
|
||||||
realpos.y *= GetZoom();
|
realpos.y *= GetZoom();
|
||||||
|
|
||||||
realpos.x += GetScreen()->m_DrawOrg.x;
|
realpos.x += GetScreen()->m_DrawOrg.x;
|
||||||
realpos.y += GetScreen()->m_DrawOrg.y;
|
realpos.y += GetScreen()->m_DrawOrg.y;
|
||||||
|
|
||||||
|
@ -576,7 +589,8 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
|
||||||
ii = pas_grille_affichee.x / zoom;
|
ii = pas_grille_affichee.x / zoom;
|
||||||
if( ii < 5 )
|
if( ii < 5 )
|
||||||
{
|
{
|
||||||
pas_grille_affichee.x *= 2; ii *= 2;
|
pas_grille_affichee.x *= 2;
|
||||||
|
ii *= 2;
|
||||||
}
|
}
|
||||||
if( ii < 5 )
|
if( ii < 5 )
|
||||||
drawgrid = FALSE; // grille trop petite
|
drawgrid = FALSE; // grille trop petite
|
||||||
|
@ -584,14 +598,18 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
|
||||||
ii = pas_grille_affichee.y / zoom;
|
ii = pas_grille_affichee.y / zoom;
|
||||||
if( ii < 5 )
|
if( ii < 5 )
|
||||||
{
|
{
|
||||||
pas_grille_affichee.y *= 2; ii *= 2;
|
pas_grille_affichee.y *= 2;
|
||||||
|
ii *= 2;
|
||||||
}
|
}
|
||||||
if( ii < 5 )
|
if( ii < 5 )
|
||||||
drawgrid = FALSE; // grille trop petite
|
drawgrid = FALSE; // grille trop petite
|
||||||
|
|
||||||
GetViewStart( &org.x, &org.y );
|
GetViewStart( &org.x, &org.y );
|
||||||
GetScrollPixelsPerUnit( &ii, &jj );
|
GetScrollPixelsPerUnit( &ii, &jj );
|
||||||
org.x *= ii; org.y *= jj;
|
|
||||||
|
org.x *= ii;
|
||||||
|
org.y *= jj;
|
||||||
|
|
||||||
screen->m_StartVisu = org;
|
screen->m_StartVisu = org;
|
||||||
|
|
||||||
org.x *= zoom;
|
org.x *= zoom;
|
||||||
|
@ -851,11 +869,13 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event )
|
||||||
IgnoreNextLeftButtonRelease = true;
|
IgnoreNextLeftButtonRelease = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( event.LeftUp() && screen->BlockLocate.m_State==STATE_NO_BLOCK )
|
else if( event.LeftUp() )
|
||||||
if ( ! IgnoreNextLeftButtonRelease )
|
{
|
||||||
|
if( screen->BlockLocate.m_State==STATE_NO_BLOCK && !IgnoreNextLeftButtonRelease )
|
||||||
m_Parent->OnLeftClick( &DC, screen->m_MousePositionInPixels );
|
m_Parent->OnLeftClick( &DC, screen->m_MousePositionInPixels );
|
||||||
|
|
||||||
if( event.LeftUp() ) IgnoreNextLeftButtonRelease = false;
|
IgnoreNextLeftButtonRelease = false;
|
||||||
|
}
|
||||||
|
|
||||||
if( event.ButtonUp( 2 ) && (screen->BlockLocate.m_State == STATE_NO_BLOCK) )
|
if( event.ButtonUp( 2 ) && (screen->BlockLocate.m_State == STATE_NO_BLOCK) )
|
||||||
{
|
{
|
||||||
|
|
6
todo.txt
6
todo.txt
|
@ -56,3 +56,9 @@ when Undo/Redo stack is empty/filled.
|
||||||
can now identify a marker. To see where the user gets a menu to delete a marker:
|
can now identify a marker. To see where the user gets a menu to delete a marker:
|
||||||
void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
|
|
||||||
|
|
||||||
|
*** fix MARQUEUR::HitTest():
|
||||||
|
the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
|
||||||
|
as zoom changes, the effective real size of the MARKER changes.
|
||||||
|
@todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue