Save new thumbnail positions immediately after they have been moved
This commit is contained in:
@@ -16,6 +16,8 @@ namespace EveOPreview.UI
|
||||
Action<IList<IThumbnailView>> ThumbnailsAdded { get; set; }
|
||||
Action<IList<IThumbnailView>> ThumbnailsUpdated { get; set; }
|
||||
Action<IList<IThumbnailView>> ThumbnailsRemoved { get; set; }
|
||||
|
||||
Action<String, String, Point> ThumbnailPositionChanged { get; set; }
|
||||
Action<Size> ThumbnailSizeChanged { get; set; }
|
||||
}
|
||||
}
|
@@ -47,6 +47,8 @@ namespace EveOPreview.UI
|
||||
this._thumbnailManager.ThumbnailsAdded = this.ThumbnailsAdded;
|
||||
this._thumbnailManager.ThumbnailsUpdated = this.ThumbnailsUpdated;
|
||||
this._thumbnailManager.ThumbnailsRemoved = this.ThumbnailsRemoved;
|
||||
|
||||
this._thumbnailManager.ThumbnailPositionChanged = this.ThumbnailPositionChanged;
|
||||
this._thumbnailManager.ThumbnailSizeChanged = this.ThumbnailSizeChanged;
|
||||
}
|
||||
|
||||
@@ -207,6 +209,12 @@ namespace EveOPreview.UI
|
||||
return thumbnailViews;
|
||||
}
|
||||
|
||||
private void ThumbnailPositionChanged(String thumbnailName, String activeClientName, Point location)
|
||||
{
|
||||
this._configuration.SetThumbnailLocation(thumbnailName, activeClientName, location);
|
||||
this._configurationStorage.Save();
|
||||
}
|
||||
|
||||
private void ThumbnailSizeChanged(Size size)
|
||||
{
|
||||
this.View.ThumbnailSize = size;
|
||||
|
@@ -52,6 +52,8 @@ namespace EveOPreview.UI
|
||||
|
||||
public Action<IList<IThumbnailView>> ThumbnailsRemoved { get; set; }
|
||||
|
||||
public Action<String, String, Point> ThumbnailPositionChanged { get; set; }
|
||||
|
||||
public Action<Size> ThumbnailSizeChanged { get; set; }
|
||||
|
||||
public void Activate()
|
||||
@@ -374,7 +376,7 @@ namespace EveOPreview.UI
|
||||
|
||||
IThumbnailView view = this._thumbnailViews[id];
|
||||
|
||||
this._configuration.SetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation);
|
||||
this.ThumbnailPositionChanged?.Invoke(view.Title, this._activeClientTitle, view.ThumbnailLocation);
|
||||
|
||||
view.Refresh(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user