Fix typing problems with GR_KB_* constants

This commit is contained in:
Chris Pavlina
2016-01-20 07:11:17 -05:00
parent cf9a9a09ad
commit c490e7dd06
26 changed files with 70 additions and 50 deletions
+9 -2
View File
@@ -78,7 +78,7 @@ static void MoveMarkedItems( MODULE* module, wxPoint offset );
static void DeleteMarkedItems( MODULE* module );
int FOOTPRINT_EDIT_FRAME::BlockCommand( int key )
int FOOTPRINT_EDIT_FRAME::BlockCommand( EDA_KEY key )
{
int cmd;
@@ -88,7 +88,14 @@ int FOOTPRINT_EDIT_FRAME::BlockCommand( int key )
cmd = key & 0xFF;
break;
case - 1:
case EDA_KEY_C( 0xffffffff ): // -1
// Historically, -1 has been used as a key, which can cause bit flag
// clashes with unaware code. On debug builds, catch any old code that
// might still be doing this. TODO: remove if sure all this old code is gone.
wxFAIL_MSG( "negative EDA_KEY value should be converted to GR_KEY_INVALID" );
// fall through on release builds
case GR_KEY_INVALID:
cmd = BLOCK_PRESELECT_MOVE;
break;