Commit 55fa3bbc4248592b1c1fcd9da45590152344de89
1 parent
e2a002b9
Exists in
master
and in
91 other branches
Reset plot request modifications when PlotUI is closed (#8772) + Fix modifications check
Showing
4 changed files
with
15 additions
and
2 deletions
Show diff stats
js/app/controllers/PlotModule.js
... | ... | @@ -210,6 +210,7 @@ Ext.define('amdaDesktop.PlotModule', { |
210 | 210 | var win = desktop.getWindow(this.id); |
211 | 211 | if (win) { |
212 | 212 | // Plot UI is opened => add plot in a new tab |
213 | + me.linkedNode.get('object').plots().add(plotNode); | |
213 | 214 | me.getUiContent().editPlot(plotNode); |
214 | 215 | win.show(); |
215 | 216 | } | ... | ... |
js/app/views/PlotComponents/PlotTabContent.js
js/app/views/PlotComponents/PlotTabPanel.js
... | ... | @@ -48,6 +48,15 @@ Ext.define('amdaPlotComp.PlotTabPanel', { |
48 | 48 | } |
49 | 49 | } |
50 | 50 | }, |
51 | + | |
52 | + isDirty : function() { | |
53 | + var dirty = false; | |
54 | + this.multiplot_object.plots().each(function (rec, index) { | |
55 | + if (rec.get('object').get('id') != '') | |
56 | + dirty |= rec.get('object').isDirty(); | |
57 | + }); | |
58 | + return dirty; | |
59 | + }, | |
51 | 60 | |
52 | 61 | addPlotNode: function(plotNode, selectTab) |
53 | 62 | { | ... | ... |
js/app/views/PlotUI.js
... | ... | @@ -96,8 +96,8 @@ Ext.define('amdaUI.PlotUI', { |
96 | 96 | var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); |
97 | 97 | if (module) |
98 | 98 | module.closeInteractiveSession(); |
99 | - | |
100 | - return this.object.isDirty(); | |
99 | + | |
100 | + return this.plotTabs.isDirty(); | |
101 | 101 | }, |
102 | 102 | |
103 | 103 | /** | ... | ... |