Skip to content

Commit 1f60128

Browse files
committed
fixed unsaved changes indication appearing after loading a project
1 parent d969324 commit 1f60128

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

packages/selenium-ide/src/neo/stores/domain/ProjectStore.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,17 @@ export default class ProjectStore {
204204
}
205205
}
206206

207+
@action.bound
208+
saved() {
209+
this._tests.forEach(test => {
210+
test.modified = false
211+
})
212+
this._suites.forEach(test => {
213+
test.modified = false
214+
})
215+
this.setModified(false)
216+
}
217+
207218
@action.bound
208219
fromJS(jsRep) {
209220
this.name = jsRep.name
@@ -219,7 +230,7 @@ export default class ProjectStore {
219230
this.plugins.replace(jsRep.plugins)
220231
this.version = jsRep.version
221232
this.id = jsRep.id || uuidv4()
222-
this.setModified(false)
233+
this.saved()
223234
}
224235

225236
dispose() {

packages/selenium-ide/src/neo/stores/view/UiState.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ class UiState {
520520
this.suiteStates = {}
521521
this.selectTest(this._project.tests[0])
522522
WindowSession.closeAllOpenedWindows()
523+
this.saved()
523524
}
524525

525526
isSaved() {
@@ -528,13 +529,7 @@ class UiState {
528529

529530
@action.bound
530531
saved() {
531-
this._project._tests.forEach(test => {
532-
test.modified = false
533-
})
534-
this._project._suites.forEach(test => {
535-
test.modified = false
536-
})
537-
this._project.setModified(false)
532+
this._project.saved()
538533
}
539534
}
540535

0 commit comments

Comments
 (0)