Ensure that the file name should be reflected on the query tool for the new tab title.

This commit is contained in:
Aditya Toshniwal 2022-06-28 18:21:08 +05:30 committed by Akshay Joshi
parent b804f7db03
commit 524626b895
2 changed files with 1 additions and 1 deletions

View File

@ -419,6 +419,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
setQtState({
current_file: fileName,
});
isDirtyRef.current = false;
setPanelTitle(panel, fileName, {...qtState, current_file: fileName});
}
};

View File

@ -282,7 +282,6 @@ export default function Query() {
checkTrojanSource(res.data);
lastSavedText.current = res.data;
eventBus.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, fileName, true);
eventBus.fireEvent(QUERY_TOOL_EVENTS.QUERY_CHANGED, isDirty());
}).catch((err)=>{
eventBus.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, null, false);
eventBus.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR, err);