Sandrosbranch

Fixed an ugly bug in the ActivityDialog:
There were unpredictable and weird results when editing and adding activities. The problem was that several ActivityDialogControllers were created that listened to the same buttons and as a result a click on the OK button resulted in the reaction of several controllers. So it was possible that when adding a new activity, the activity was added several times instead of only once.