Ahh I see because `getDialog` is expected to modify the `selectedFilter` when called. Pretty bad Python style code there - not your fault I know.

Knowing this the patch makes more sense.  Would be good to refector this in future.