If you click the + button in the tree to add a new gadget the id of the currently selected gadget is modified to be the if of the new gadget. When you select the gadget that you had selected when you created the new gadget it will render the new gadget. This is due to a timing bug when we emit the show event in SidebarNav.addSpec. This eventually calls the renderGadget event in MainContainer.js which calls sideBarNav.setNewId. setNewId assumes that the new gadget spec that was created is already selected, but sometimes that has not happened yet. So we end up changing the id of the spec we had selected when we created the new gadget.
If you click the + button in the tree to add a new gadget the id of the currently selected gadget is modified to be the if of the new gadget. When you select the gadget that you had selected when you created the new gadget it will render the new gadget. This is due to a timing bug when we emit the show event in SidebarNav.addSpec. This eventually calls the renderGadget event in MainContainer.js which calls sideBarNav.setNewId. setNewId assumes that the new gadget spec that was created is already selected, but sometimes that has not happened yet. So we end up changing the id of the spec we had selected when we created the new gadget.