From 26f8b141cfb6d69b56c8cc15587128ff00fe1339 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 23 Mar 2017 12:15:08 +0100
Subject: [PATCH] OO-2643: catch only the final event

---
 .../repository/ui/author/AuthorListController.java  | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/olat/repository/ui/author/AuthorListController.java b/src/main/java/org/olat/repository/ui/author/AuthorListController.java
index 63ffc5f7edc..6130c5c4d16 100644
--- a/src/main/java/org/olat/repository/ui/author/AuthorListController.java
+++ b/src/main/java/org/olat/repository/ui/author/AuthorListController.java
@@ -110,7 +110,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 /**
  * 
  * Initial date: 28.04.2014<br>
- * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
+ * @author srosse, stephane.rosse@frentix.com, http://www.frentix.comx
  *
  */
 public class AuthorListController extends FormBasicController implements Activateable2, AuthoringEntryDataSourceUIFactory, FlexiTableCssDelegate {
@@ -484,11 +484,14 @@ public class AuthorListController extends FormBasicController implements Activat
 				cleanUp();
 			}
 		} else if(closeCtrl == source) {
-			cmc.deactivate();
-			if(event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
+			if(event == Event.CANCELLED_EVENT) {
+				cmc.deactivate();
+				cleanUp();
+			} else if(event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
+				cmc.deactivate();
 				reloadRows();
+				cleanUp();
 			}
-			cleanUp();
 		} else if(confirmDeleteCtrl == source) {
 			if(event == Event.CANCELLED_EVENT) {
 				cmc.deactivate();
@@ -517,6 +520,7 @@ public class AuthorListController extends FormBasicController implements Activat
 		removeAsListenerAndDispose(importCtrl);
 		removeAsListenerAndDispose(wizardCtrl);
 		removeAsListenerAndDispose(toolsCtrl);
+		removeAsListenerAndDispose(closeCtrl);
 		removeAsListenerAndDispose(cmc);
 		confirmDeleteCtrl = null;
 		toolsCalloutCtrl = null;
@@ -525,6 +529,7 @@ public class AuthorListController extends FormBasicController implements Activat
 		importCtrl = null;
 		wizardCtrl = null;
 		toolsCtrl = null;
+		closeCtrl = null;
 		cmc = null;
 	}
 	
-- 
GitLab