Partly revert change from df2f645e and ensure that switch statement correctly uses linedit and combobox casts. Code becomes much more clear by this and does not use non-obvious switch-without-break constructs anymore.