← Back to team overview

kicad-developers team mailing list archive

Patch: Fix another cursor artifact after "Zoom Block" command

 

Problem: After a "Zoom Block" command in pcbnew, the rectangle boundary is displayed on the screen, in the wrong position.

To reproduce: Execute "Zoom Block", either with the middle mouse or with the left-mouse/right-mouse sequence. Observe that a spurious rectangle now appears, with the lower right corner in the center of the screen.

Root Cause: The "ManageCurseur" hook is set to NULL too late, after the zoomed image has already been redisplayed.

Patch:

*** c:/kicad-dev/pcbnew/block.cpp~ Thu Feb 23 17:36:40 2006
--- c:/kicad-dev/pcbnew/block.cpp Sun Apr 2 22:08:38 2006
***************
*** 344,349 ****
--- 344,352 ----
case BLOCK_PASTE: break;

case BLOCK_ZOOM: /* Window Zoom */
+ // Turn off the block rectangle now so it is not displayed
+ // with one corner at the new center of the screen.
+ GetScreen()->ManageCurseur = NULL;
Window_Zoom( GetScreen()->BlockLocate );
break;