Fixed bug related to partial command execution on SQL tool (issue #502)

Minor fix on model navigation widget when closing a model
Merge branch 'fix502-partial-sql-exec' into faithful-elephant