kicad-developers team mailing list archive
Mailing list archive
Re: Is eeschema block selection broken?
-----BEGIN PGP SIGNED MESSAGE-----
On 08/30/10 11:44, Lorenzo Marcantonio wrote:
> I can't select anymore in eeschema dragging with the left mouse
> button... did something change?
I had trouble with this as well, because wxWidgets sends an extra
"MouseEntered" event every time the mouse is pressed. Not only in
eeschema, but also in pcbnew.
The problem only occurs for me on fluxbox and windowmaker, not on xfce.
Didn't manage to create a sensible patch yet (or even to find the real
culprit - probably buried somewhere in wxWidgets or even deeper), and it
won't happen this week either. Maybe next week...
If you are happy with a crude workaround, check the attached patch
(Dick: The one you - rightly - rejected). Might help you, but you might
also be running into an entirely different problem.
eMails verschlüsseln mit PGP - privacy is your right!
Mein PGP-Key zur Verifizierung: http://pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
--- kicad/common/drawpanel.cpp 2010-08-13 15:15:02.000000000 +0200
+++ kicad_new/common/drawpanel.cpp 2010-08-13 15:04:14.000000000 +0200
@@ -27,7 +27,11 @@
#define DEBUG_SHOW_CLIP_RECT 0 // Set to 1 to draw clipping rectangle.
#define DEBUG_DUMP_CLIP_COORDS 0 // Set to 1 to dump clipping rectangle coordinates.
#define DEBUG_DUMP_SCROLL_SETTINGS 0 // Set to 1 to dump scroll settings.
+#define DEBUG_BLOCKS 0 // Set to 1 to dump block information
+/* Definitions for workarounds in drawpanel.cpp */
+#define FLUXBOX_WORKAROUND 1 // Set to 1 to enable group/block actions on fluxbox, windowmaker, fvwm and probably others
+ // with this, we ignore mouse entering events if the left button is pressed
/* Used to inhibit a response to a mouse left button release, after a
* double click (when releasing the left button at the end of the second
@@ -1042,8 +1046,21 @@ void WinEDA_DrawPanel::OnMouseEvent( wxM
* MIN_DRAG_COUNT_FOR_START_BLOCK_COMMAND in order to avoid spurious block
* commands. */
static int MinDragEventCount;
+ std::cout << "Left button pressed: " << event.LeftDown() << " Middle button pressed: " << event.MiddleDown() << std::endl
+ << "Left button down: " << event.LeftIsDown() << "Middle Button down: " << event.MiddleIsDown() << std::endl
+ << "event.Leaving: " << event.Leaving() << " event.Entering:" << event.Entering() << " Can start block: " << m_CanStartBlock << std::endl << std::endl;
if( event.Leaving() || event.Entering() )
+ // when using fluxbox (and probably windowmaker, fwvm) we get two events on a mouse left click. Ignore the entering event in this case.
+ // (there won't be an event on entering until we release the left mouse button anyway)
m_CanStartBlock = -1;
Description: PGP signature