diff --git a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs index d14e7e7..693e12d 100644 --- a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs +++ b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs @@ -383,11 +383,20 @@ namespace EveOPreview.Services private void ThumbnailActivated(IntPtr id) { - // View is always available because this method is actually being called by - // a view callback IThumbnailView view = this._thumbnailViews[id]; - Task.Run(() => this._windowManager.ActivateWindow(view.Id)); + Task.Run(() => + { + this._windowManager.ActivateWindow(view.Id); + }) + .ConfigureAwait(true) + .GetAwaiter() + .OnCompleted(() => + { + this.SwitchActiveClient(view.Id, view.Title); + this.UpdateClientLayouts(); + this.RefreshThumbnails(); + }); this.UpdateClientLayouts(); } diff --git a/Eve-O-Preview/View/Implementation/ThumbnailView.cs b/Eve-O-Preview/View/Implementation/ThumbnailView.cs index 5426fcf..7199707 100644 --- a/Eve-O-Preview/View/Implementation/ThumbnailView.cs +++ b/Eve-O-Preview/View/Implementation/ThumbnailView.cs @@ -116,8 +116,7 @@ namespace EveOPreview.View this._isSizeChanged = true; this._isOverlayVisible = false; - // Thumbnail will be properly registered during the Manager's Refresh cycle - this.Refresh(); + this.Refresh(true); this.IsActive = true; }