Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
I'm still trying to assimilate what just happened. It seems that, after several debugging sessions that took me nowhere, I * rebooted* the damn MacOSX, and ... mba:KiCad ajo$ ./eeschema.app/Contents/MacOS/eeschema open HID: Apple Internal Keyboard / Trackpad open HID: Apple Keyboard snapToGrid: 1 , aHotkey:0 WXKSHIFT: 0, WXKCONTROL: 0 snapToGrid: 1 , aHotkey:0 WXKSHIFT: 0, WXKCONTROL: 0 snapToGrid: 1 , aHotkey:0 WXKSHIFT: 0, WXKCONTROL: 0 snapToGrid: 1 , aHotkey:0 WXKSHIFT: 0, WXKCONTROL: 0 snapToGrid: 1 , aHotkey:0 WXKSHIFT: 0, WXKCONTROL: 0 Now WXK_SHIFT and control are reported as non pushed, so grid snap works again... so I will blame Darwin... and bug is fixed with 0 patches. Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Dick Hollenbeck d...@softplc.com On 09/16/2013 09:01 AM, Tomasz Wlostowski wrote: On 09/16/2013 03:54 PM, Miguel Angel wrote: It really seems like a wx/MACOSX related bug to me, Miguel, Welcome to the wonderful world of cross-platform compatibility of wxWidgets. This is exactly why we (me Orson) don't want to use any sort of wx events in new tools. Cheers, Tom I suspect that the wxWidgets team will continue to accept patches, given that they have more than 80,000 commits already into the project and it is still active. My guess is that KiCad will continue to use wxWidgets for some time, and that wxWidgets will continue to use wxEvents for some time. Therefore, this has KiCad using wxEvents for some time. Regards, Dick ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
More detail about this, it happens to me with bzr4313 and bzr4107 , I don't remember having problems with this previously. When I move a block of components, the grid snap works. If I move a single component ('M key') it moves, with no snap. If I draw a wire, no snap. Could it be a misconfiguration on my side?, I erased the .pro eeschema section for just in case it was reading an old (no nanometer setting), but may be it's more like a system wide setting. (Where) does eeschema/kicad store system wide settings? Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/13 Miguel Angel miguelan...@ajo.es Is it normal/does it only happen on my system?, When I draw a wire or when I move a component, the grid is painted, but doesn't seem to work. It's making it impossible to me to match connections ':) Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
I highly suspect that this behaviour comes from here (eeschema/controle.cpp), may be a wxBug(tm) related to Mac OSX? .. this look like a lot of conditions to get satisfied by a bug..: if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; but this second line, really matches the behaviour described in my previous email: // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; stay tuned. void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint aPosition, int aHotKey ) { wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint pos = aPosition; // when moving mouse, use the magnetic grid, unless the shift+ctrl keys is pressed // for next cursor position // ( shift or ctrl key down are PAN command with mouse wheel) bool snapToGrid = true; if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; if( snapToGrid ) pos = GetNearestGridPosition( pos ); oldpos = GetCrossHairPosition(); gridSize = screen-GetGridSize(); Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es More detail about this, it happens to me with bzr4313 and bzr4107 , I don't remember having problems with this previously. When I move a block of components, the grid snap works. If I move a single component ('M key') it moves, with no snap. If I draw a wire, no snap. Could it be a misconfiguration on my side?, I erased the .pro eeschema section for just in case it was reading an old (no nanometer setting), but may be it's more like a system wide setting. (Where) does eeschema/kicad store system wide settings? Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/13 Miguel Angel miguelan...@ajo.es Is it normal/does it only happen on my system?, When I draw a wire or when I move a component, the grid is painted, but doesn't seem to work. It's making it impossible to me to match connections ':) Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
It really seems like a wx/MACOSX related bug to me, printf(snapToGrid: %d , aHotkey:%d WXKSHIFT: %d, WXKCONTROL: %d\n,snapToGrid,aHotKey ,wxGetKeyState( WXK_SHIFT ), wxGetKeyState( WXK_CONTROL )); always print WXK_SHIFT and WXK_CONTROL as true snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 For reference: ::wxGetKeyState *bool* *wxGetKeyState*(*wxKeyCode **key*) For normal keys, returns true if the specified key is currently down. For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns true if the key is toggled such that its LED indicator is lit. There is currently no way to test whether togglable keys are up or down. Even though there are virtual key codes defined for mouse buttons, they cannot be used with this function currently. *Include files* wx/utils.h Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es I highly suspect that this behaviour comes from here (eeschema/controle.cpp), may be a wxBug(tm) related to Mac OSX? .. this look like a lot of conditions to get satisfied by a bug..: if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; but this second line, really matches the behaviour described in my previous email: // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; stay tuned. void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint aPosition, int aHotKey ) { wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint pos = aPosition; // when moving mouse, use the magnetic grid, unless the shift+ctrl keys is pressed // for next cursor position // ( shift or ctrl key down are PAN command with mouse wheel) bool snapToGrid = true; if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; if( snapToGrid ) pos = GetNearestGridPosition( pos ); oldpos = GetCrossHairPosition(); gridSize = screen-GetGridSize(); Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es More detail about this, it happens to me with bzr4313 and bzr4107 , I don't remember having problems with this previously. When I move a block of components, the grid snap works. If I move a single component ('M key') it moves, with no snap. If I draw a wire, no snap. Could it be a misconfiguration on my side?, I erased the .pro eeschema section for just in case it was reading an old (no nanometer setting), but may be it's more like a system wide setting. (Where) does eeschema/kicad store system wide settings? Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/13 Miguel Angel miguelan...@ajo.es Is it normal/does it only happen on my system?, When I draw a wire or when I move a component, the grid is painted, but doesn't seem to work. It's making it impossible to me to match connections ':) Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
On 09/16/2013 03:54 PM, Miguel Angel wrote: It really seems like a wx/MACOSX related bug to me, Miguel, Welcome to the wonderful world of cross-platform compatibility of wxWidgets. This is exactly why we (me Orson) don't want to use any sort of wx events in new tools. Cheers, Tom printf(snapToGrid: %d , aHotkey:%d WXKSHIFT: %d, WXKCONTROL: %d\n,snapToGrid,aHotKey ,wxGetKeyState( WXK_SHIFT ), wxGetKeyState( WXK_CONTROL )); always print WXK_SHIFT and WXK_CONTROL as true snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 For reference: ::wxGetKeyState *bool* *wxGetKeyState*(*wxKeyCode */key/) For normal keys, returns true if the specified key is currently down. For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns true if the key is toggled such that its LED indicator is lit. There is currently no way to test whether togglable keys are up or down. Even though there are virtual key codes defined for mouse buttons, they cannot be used with this function currently. *Include files* wx/utils.h Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es mailto:miguelan...@ajo.es I highly suspect that this behaviour comes from here (eeschema/controle.cpp), may be a wxBug(tm) related to Mac OSX? .. this look like a lot of conditions to get satisfied by a bug..: if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; but this second line, really matches the behaviour described in my previous email: // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; stay tuned. void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint aPosition, int aHotKey ) { wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint pos = aPosition; // when moving mouse, use the magnetic grid, unless the shift+ctrl keys is pressed // for next cursor position // ( shift or ctrl key down are PAN command with mouse wheel) bool snapToGrid = true; if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; if( snapToGrid ) pos = GetNearestGridPosition( pos ); oldpos = GetCrossHairPosition(); gridSize = screen-GetGridSize(); Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 tel:%2B34%20636%2052%2025%2069 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es mailto:miguelan...@ajo.es More detail about this, it happens to me with bzr4313 and bzr4107 , I don't remember having problems with this previously. When I move a block of components, the grid snap works. If I move a single component ('M key') it moves, with no snap. If I draw a wire, no snap. Could it be a misconfiguration on my side?, I erased the .pro eeschema section for just in case it was reading an old (no nanometer setting), but may be it's more like a system wide setting. (Where) does eeschema/kicad store system wide settings? Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 tel:%2B34%20636%2052%2025%2069 skype: ajoajoajo 2013/9/13 Miguel Angel miguelan...@ajo.es mailto:miguelan...@ajo.es Is it normal/does it only happen on my system?, When I draw a wire or when I move a component, the grid is painted, but doesn't seem to work. It's making it impossible to me to match connections ':) Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 tel:%2B34%20636%2052%2025%2069 skype: ajoajoajo ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe :
Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
Arf, I already had my own personal welcome, when I started using kicad on OSX, packed Marco Serantoni wx patches into the KiCad builder.. and then Felix Morgner contributed a few more. It looks like we will have a new one soon. wxwidgets for macosx seems to poll over all the system available keyboards, may be something new I connected is acting as an evil keyboard... bool wxGetKeyState (wxKeyCode key) { [...] for(size_t i = 0; i wxHIDModule::sm_keyboards.GetCount(); ++i) { wxHIDKeyboard* keyboard = (wxHIDKeyboard*) wxHIDModule::sm_keyboards[i]; switch(key) { case WXK_SHIFT: if( keyboard-IsActive(WXK_SHIFT) || keyboard-IsActive(WXK_RSHIFT) ) { return true; } break; Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Tomasz Wlostowski tomasz.wlostow...@cern.ch On 09/16/2013 03:54 PM, Miguel Angel wrote: It really seems like a wx/MACOSX related bug to me, Miguel, Welcome to the wonderful world of cross-platform compatibility of wxWidgets. This is exactly why we (me Orson) don't want to use any sort of wx events in new tools. Cheers, Tom printf(snapToGrid: %d , aHotkey:%d WXKSHIFT: %d, WXKCONTROL: %d\n,snapToGrid,aHotKey ,wxGetKeyState( WXK_SHIFT ), wxGetKeyState( WXK_CONTROL )); always print WXK_SHIFT and WXK_CONTROL as true snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 snapToGrid: 0 , aHotkey:0 WXKSHIFT: 1, WXKCONTROL: 1 For reference: ::wxGetKeyState *bool* *wxGetKeyState*(*wxKeyCode */key/) For normal keys, returns true if the specified key is currently down. For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns true if the key is toggled such that its LED indicator is lit. There is currently no way to test whether togglable keys are up or down. Even though there are virtual key codes defined for mouse buttons, they cannot be used with this function currently. *Include files* wx/utils.h Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es mailto:miguelan...@ajo.es I highly suspect that this behaviour comes from here (eeschema/controle.cpp), may be a wxBug(tm) related to Mac OSX? .. this look like a lot of conditions to get satisfied by a bug..: if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; but this second line, really matches the behaviour described in my previous email: // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.**GetState() != STATE_NO_BLOCK ) snapToGrid = true; stay tuned. void SCH_EDIT_FRAME::**GeneralControl( wxDC* aDC, const wxPoint aPosition, int aHotKey ) { wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint pos = aPosition; // when moving mouse, use the magnetic grid, unless the shift+ctrl keys is pressed // for next cursor position // ( shift or ctrl key down are PAN command with mouse wheel) bool snapToGrid = true; if( !aHotKey wxGetKeyState( WXK_SHIFT ) wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; // Cursor is left off grid only if no block in progress if( GetScreen()-m_BlockLocate.**GetState() != STATE_NO_BLOCK ) snapToGrid = true; if( snapToGrid ) pos = GetNearestGridPosition( pos ); oldpos = GetCrossHairPosition(); gridSize = screen-GetGridSize(); Miguel Angel Ajo Pelayo http://www.nbee.es +34 636 52 25 69 tel:%2B34%20636%2052%2025%**2069 skype: ajoajoajo 2013/9/16 Miguel Angel miguelan...@ajo.es mailto:miguelan...@ajo.es More detail about this, it happens to me with bzr4313 and bzr4107 , I don't remember having problems with this previously. When I move a block of components, the grid snap works. If I move a single component ('M key') it moves, with no snap. If I draw a wire, no snap. Could it be a misconfiguration on my side?, I erased the .pro eeschema section for just in case it was reading an old (no nanometer setting), but may be it's more like a system wide setting. (Where) does eeschema/kicad store system wide settings? Miguel Angel Ajo
Re: [Kicad-developers] Strange behaviour, schematic, moving components doesn't obey the grid
On 09/16/2013 09:01 AM, Tomasz Wlostowski wrote: On 09/16/2013 03:54 PM, Miguel Angel wrote: It really seems like a wx/MACOSX related bug to me, Miguel, Welcome to the wonderful world of cross-platform compatibility of wxWidgets. This is exactly why we (me Orson) don't want to use any sort of wx events in new tools. Cheers, Tom I suspect that the wxWidgets team will continue to accept patches, given that they have more than 80,000 commits already into the project and it is still active. My guess is that KiCad will continue to use wxWidgets for some time, and that wxWidgets will continue to use wxEvents for some time. Therefore, this has KiCad using wxEvents for some time. Regards, Dick ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp