Added dialog to calculate distance between points (used when double clicking on empty length input boxes in add object wizard); some code refactoring