diff --git a/docs/en_US/release_notes_8_2.rst b/docs/en_US/release_notes_8_2.rst index 13e7f9938..cf728fda5 100644 --- a/docs/en_US/release_notes_8_2.rst +++ b/docs/en_US/release_notes_8_2.rst @@ -30,4 +30,5 @@ Housekeeping Bug fixes ********* + | `Issue #6781 `_ - Fixed an issue where query tool title did not change after "Save As" until any new change is made. | `Issue #6781 `_ - Fixed an issue where export servers was not adding extension if not specified. diff --git a/web/pgadmin/static/js/helpers/Layout/index.jsx b/web/pgadmin/static/js/helpers/Layout/index.jsx index 6047b2c0a..2a166cb61 100644 --- a/web/pgadmin/static/js/helpers/Layout/index.jsx +++ b/web/pgadmin/static/js/helpers/Layout/index.jsx @@ -146,7 +146,6 @@ export class LayoutDocker { ...panelData.internal, ...attrs, }; - this.eventBus.fireEvent(LAYOUT_EVENTS.REFRESH_TITLE, panelId); } getInternalAttrs(panelId) { diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx index 62dc13920..d5b6db1d4 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx @@ -457,7 +457,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN current_file: fileName, }); isDirtyRef.current = false; - setPanelTitle(qtPanelDocker, qtPanelId, fileName, {...qtState, current_file: fileName}); + setPanelTitle(qtPanelDocker, qtPanelId, fileName, {...qtState, current_file: fileName}, isDirtyRef.current); } eventBus.current.fireEvent(QUERY_TOOL_EVENTS.EDITOR_LAST_FOCUS); }; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx index be35bf418..c07556ad3 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx @@ -256,6 +256,9 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) { eventBus.registerListener(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, ()=>{ setDisableButton('save', true); }); + eventBus.registerListener(QUERY_TOOL_EVENTS.SAVE_FILE_DONE, ()=>{ + setDisableButton('save', true); + }); eventBus.registerListener(QUERY_TOOL_EVENTS.DATAGRID_CHANGED, (isDirty)=>{ setDisableButton('save-data', !isDirty); }); diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx index 9f01c73a0..d5ff61174 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx @@ -396,7 +396,6 @@ export default function Query() { }).then(()=>{ lastSavedText.current = editorValue; eventBus.fireEvent(QUERY_TOOL_EVENTS.SAVE_FILE_DONE, fileName, true); - eventBus.fireEvent(QUERY_TOOL_EVENTS.QUERY_CHANGED, isDirty()); pgAdmin.Browser.notifier.success(gettext('File saved successfully.')); }).catch((err)=>{ eventBus.fireEvent(QUERY_TOOL_EVENTS.SAVE_FILE_DONE, null, false);