fixes #2099 use selectElement function to select new elements added inst...

...ead of simply seeting the class, as it needs to ensure it opens the editor too.