diff --git a/change_log.txt b/change_log.txt index 0a42764b24..9c963c667b 100644 --- a/change_log.txt +++ b/change_log.txt @@ -5,6 +5,13 @@ Please add newer entries at the top, list the date and your name with email address. + +2007-Dec-06 UPDATE Jean-Pierre Charras +================================================================================ + Solved zoom key command problems (under linux and windows) + (seen http://sourceforge.net/tracker/index.php?func=detail&aid=1844960&group_id=145591&atid=762476) + + 2007-Dec-4 UPDATE Dick Hollenbeck ================================================================================ +pcbnew diff --git a/share/drawpanel.cpp b/share/drawpanel.cpp index 7b5dab958c..807099ac00 100644 --- a/share/drawpanel.cpp +++ b/share/drawpanel.cpp @@ -1066,6 +1066,16 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event ) } } + /* some key commands use the mouse position: refresh it */ + wxPoint mouse_pos = wxGetMousePosition(); // Get the mouse position on screen + wxPoint win_pos = GetScreenPosition(); // get the draw area (panel)position on screen + mouse_pos -= win_pos; // mouse_pos = is the mouse position relative to the panel + /* Compute absolute m_MousePosition in pixel units (i.e. considering the current scrool) : */ + Screen->m_MousePositionInPixels = CalcAbsolutePosition( mouse_pos ); + + /* Compute absolute m_MousePosition in user units: */ + Screen->m_MousePosition = CursorRealPosition( Screen->m_MousePositionInPixels ); + m_Parent->GeneralControle( &DC, Screen->m_MousePositionInPixels ); #if 0