Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't persist current tab when display is locked #7882

Merged
merged 11 commits into from
Oct 11, 2024
Prev Previous commit
Next Next commit
Add a check for persistability in addition to locked
  • Loading branch information
shefalijoshi committed Oct 10, 2024
commit 5309b697b6b7c93a355f438754f2af2477048ba1
5 changes: 4 additions & 1 deletion src/plugins/tabs/components/TabsComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,10 @@ export default {
},
persistCurrentTabIndex(index) {
//only persist if the domain object is not locked. The object mutate API will deal with whether the object is persistable or not.
if (!this.internalDomainObject.locked) {
if (
this.openmct.objects.isPersistable(this.internalDomainObject.identifier) &&
!this.internalDomainObject.locked
) {
this.openmct.objects.mutate(this.internalDomainObject, 'currentTabIndex', index);
}
},
Expand Down