Dried up the code for "done" and "cancel" functions, in filter selection mode.