when crop committed, set rating to (at least) 1

This commit is contained in:
Colin McMillen 2023-09-01 10:27:39 -04:00
parent aa5b3e7083
commit ae0fa8f934

View File

@ -185,6 +185,9 @@ public class CropTool : ITool {
if (input.IsKeyPressed(Keys.Enter)) { if (input.IsKeyPressed(Keys.Enter)) {
game.Cursor = MouseCursor.Default; game.Cursor = MouseCursor.Default;
if (photo.Rating < 1) {
photo.Rating = 1;
}
photo.ViewOffset = new(photo.Size.X / 2 - Rectangle.Center(r).X, photo.ViewOffset = new(photo.Size.X / 2 - Rectangle.Center(r).X,
photo.Size.Y / 2 - Rectangle.Center(r).Y); photo.Size.Y / 2 - Rectangle.Center(r).Y);
return ToolStatus.Done; return ToolStatus.Done;