app: fix changing tools to not prematurely change the old tool
Commit the old tool before even creating the new tool. Old and new tool might be the same and share tool options, and we don't want the new tool's initialization to mess up the old tool's state. Fixes changing from one GEGL operation to another without explicitly confirming the first operation. The bug only killed the cached filter result, but that's bad enough.
Showing with 18 additions and 10 deletions