Fix ArrayOutOfBoundException when switching panels with an empty Discrete measurement list

Found a bug in the discrete measurement panel. You get an ArrayOutOfBoundException, when switching to a panel with an empty discrete measurement list, because it is not possible to select the last element of an empty list.

Sorry, for the bad timing (just after the 1.0 release).