Fix event id intersections when toggling some columns via popup.

Also increases maximum show/hide column count to 50.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9765
This commit is contained in:
dsa-t 2021-12-13 00:35:44 +03:00
parent b291d6c810
commit 4ccfc21324
3 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@
enum
{
MYID_SELECT_FOOTPRINT = 991, // must be within GRID_TRICKS' enum range
MYID_SELECT_FOOTPRINT = GRIDTRICKS_FIRST_SHOWHIDE - 2, // must be within GRID_TRICKS' enum range
MYID_SHOW_DATASHEET
};

View File

@ -41,7 +41,7 @@
enum
{
MYID_SELECT_FOOTPRINT = 991, // must be within GRID_TRICKS' enum range
MYID_SELECT_FOOTPRINT = GRIDTRICKS_FIRST_SHOWHIDE - 2, // must be within GRID_TRICKS' enum range
MYID_SHOW_DATASHEET
};

View File

@ -32,7 +32,7 @@
#include <wx/menu.h>
#include <widgets/wx_grid.h>
#define GRIDTRICKS_MAX_COL 20
#define GRIDTRICKS_MAX_COL 50
enum
{
@ -43,7 +43,7 @@ enum
GRIDTRICKS_ID_PASTE,
GRIDTRICKS_ID_SELECT,
GRIDTRICKS_FIRST_SHOWHIDE = 979, // reserve IDs for show/hide-column-n
GRIDTRICKS_FIRST_SHOWHIDE = 949, // reserve IDs for show/hide-column-n
GRIDTRICKS_LAST_ID = GRIDTRICKS_FIRST_SHOWHIDE + GRIDTRICKS_MAX_COL
};