Skip to content

Commit

Permalink
[2.2] Update current theme after loadThemes call is done (#4685)
Browse files Browse the repository at this point in the history
Fix order: Load themes before updating them. This allows non-public themes to be available as default themes.
  • Loading branch information
pfirpfel committed Feb 28, 2019
1 parent 625436c commit 530e577
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contribs/gmf/src/controllers/abstract.js
Expand Up @@ -147,11 +147,13 @@ gmf.AbstractController = function(config, $scope, $injector) {
// Reload theme when login status changes.
const previousThemeName = this.gmfThemeManager.getThemeName();
this.gmfThemeManager.setThemeName('', true);

// Reload themes and background layer when login status changes.
this.gmfThemes_.loadThemes(roleId);

if (evt.type !== gmf.AuthenticationEventType.READY) {
this.updateCurrentTheme_(previousThemeName);
}
// Reload themes and background layer when login status changes.
this.gmfThemes_.loadThemes(roleId);
this.setDefaultBackground_(null);
this.updateHasEditableLayers_();
};
Expand Down

0 comments on commit 530e577

Please sign in to comment.