GraphViewer: Fixed a bug when creating a new node