How does it remove that? It casts the currently selected widget to a WalletView, and is exactly how the other functions in waletstack.cpp work.