Commands are disabled by default starting from 4.1.
Avoid enabling commands like undo/redo when changing filter (calling cmd.refresh).