fix an issue with importing files

Fix #3286. There was a timing issue with the native file dialog closing, CDE re-gaining focus, the project automatically being refreshed, and the resource change from the newly imported resource.

@keertip