Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into FP-2981-ide-copy-sub-f…
Browse files Browse the repository at this point in the history
…low-doesnt-work
  • Loading branch information
diasdm committed Oct 18, 2024
2 parents 6b33bee + 8838d61 commit 6e3f1b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TBD

- [FP-2981](https://movai.atlassian.net/browse/FP-2981): IDE - Copy subFlow doesn't work
- [FP-2770](https://movai.atlassian.net/browse/FP-2770): Scene closing button not working when with changes *

# 1.3.0 - This version contains breaking changes in the lib-ide <-> IDE DataTypes and useDataTypes interface

Expand Down
5 changes: 4 additions & 1 deletion src/plugins/DocManager/DocManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ class DocManager extends IDEPlugin {
return this.call(PLUGINS.DIALOG.NAME, PLUGINS.DIALOG.CALL.NEW_DOC, {
scope,
placeholder: name,
onSubmit: newName => this.doSave(modelKey, callback, newName, opts),
onSubmit: newName => {
this.doSave(modelKey, callback, newName, opts);
this.discardDocChanges({ scope, name: newName });
},
onClose: () => this.saveStack.delete(`${name}_${scope}`)
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/views/Tabs/hooks/useTabLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ const useTabLayout = (props, dockRef) => {
*/
const _onLayoutRemoveTab = useCallback(
(newLayout, tabId, forceClose) => {
const { name, scope, isNew, isDirty } = tabsByIdRef.current.get(tabId);
const { name, scope, isNew, isDirty } = tabsByIdRef.current?.get(tabId) ?? {};

if (isDirty && !forceClose) {
const document = { id: tabId, name, scope, isNew };
Expand Down

0 comments on commit 6e3f1b4

Please sign in to comment.