marsystems: Selector: reset state whenever input row count changes

This is just for consistency.

Also, remove redundant code and use more expressive variable names.
qt apps: migrate MarSndPeek to Qt 5