From 535c7eeef8cffb784977c2ab655884c9814ef6d7 Mon Sep 17 00:00:00 2001 From: Pravesh Sharma Date: Fri, 27 Sep 2024 16:22:48 +0530 Subject: [PATCH] Fixed an issue where the dock layout was not saved upon closing a tab. #7919 --- web/pgadmin/settings/__init__.py | 8 +------- web/pgadmin/static/js/helpers/Layout/index.jsx | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/web/pgadmin/settings/__init__.py b/web/pgadmin/settings/__init__.py index f651bac2f..1d1c9f3b4 100644 --- a/web/pgadmin/settings/__init__.py +++ b/web/pgadmin/settings/__init__.py @@ -119,15 +119,9 @@ def store(setting=None, value=None): success = 0 errormsg = str(e) - try: - info = traceback.format_exc() - except Exception as e: - info = str(e) - return make_json_response(success=success, errormsg=errormsg, - info=info, - result=request.form) + info=gettext("Setting stored")) @blueprint.route("/layout", methods=['DELETE'], endpoint='reset_layout') diff --git a/web/pgadmin/static/js/helpers/Layout/index.jsx b/web/pgadmin/static/js/helpers/Layout/index.jsx index 3f5f2c7b1..cb7410536 100644 --- a/web/pgadmin/static/js/helpers/Layout/index.jsx +++ b/web/pgadmin/static/js/helpers/Layout/index.jsx @@ -89,7 +89,7 @@ export class LayoutDocker { if(panelData.internal?.manualClose && !force) { this.eventBus.fireEvent(LAYOUT_EVENTS.CLOSING, panelId); } else { - this.layoutObj.dockMove(panelData, 'remove'); + this.layoutObj.dockMove(panelData, null, 'remove'); // rc-dock is not firing the "active" event after a tab is removed // and another is focussed. here we try get the new active id and // manually fire the active event