Skip to content

Commit

Permalink
Merge pull request #319 from Lehonti/improvement3
Browse files Browse the repository at this point in the history
Sealed most history item classes
  • Loading branch information
cameronwhite authored Aug 10, 2023
2 parents 8ced3f6 + 2a2de0e commit 32f4689
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/AddLayerHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace Pinta.Core
{
public class AddLayerHistoryItem : BaseHistoryItem
public sealed class AddLayerHistoryItem : BaseHistoryItem
{
private readonly int layer_index;
private UserLayer? layer;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/DeleteLayerHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace Pinta.Core
{
public class DeleteLayerHistoryItem : BaseHistoryItem
public sealed class DeleteLayerHistoryItem : BaseHistoryItem
{
private readonly int layer_index;
private UserLayer? layer;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/FinishPixelsHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Pinta.Core
{
public class FinishPixelsHistoryItem : BaseHistoryItem
public sealed class FinishPixelsHistoryItem : BaseHistoryItem
{
private ImageSurface? old_selection_layer;
private ImageSurface? old_surface;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/InvertHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Pinta.Core
{
// These are actions that can be undone by simply repeating
// the action: invert colors, rotate 180 degrees, etc
public class InvertHistoryItem : BaseHistoryItem
public sealed class InvertHistoryItem : BaseHistoryItem
{
private readonly InvertType type;
private readonly int layer_index;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/MovePixelsHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Pinta.Core
{
public class MovePixelsHistoryItem : BaseHistoryItem
public sealed class MovePixelsHistoryItem : BaseHistoryItem
{
// There's 2 types of move pixel operations to handle
// - The first move "lifts" the selection up into a temporary layer
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/PasteHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace Pinta.Core
{
public class PasteHistoryItem : BaseHistoryItem
public sealed class PasteHistoryItem : BaseHistoryItem
{
private readonly Cairo.ImageSurface paste_image;
private DocumentSelection old_selection;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/ResizeHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace Pinta.Core
{
public class ResizeHistoryItem : CompoundHistoryItem
public sealed class ResizeHistoryItem : CompoundHistoryItem
{
private Size old_size;

Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/SelectionHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace Pinta.Core
{
public class SelectionHistoryItem : BaseHistoryItem
public sealed class SelectionHistoryItem : BaseHistoryItem
{
private DocumentSelection? old_selection;
private DocumentSelection? old_previous_selection;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/SimpleHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Pinta.Core
{
public class SimpleHistoryItem : BaseHistoryItem
public sealed class SimpleHistoryItem : BaseHistoryItem
{
private readonly SurfaceDiff? surface_diff;
ImageSurface? old_surface;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/SwapLayersHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Pinta.Core
{
// These are actions that can be undone by simply repeating
// the action: invert colors, rotate 180 degrees, etc
public class SwapLayersHistoryItem : BaseHistoryItem
public sealed class SwapLayersHistoryItem : BaseHistoryItem
{
private readonly int layer_index_1;
private readonly int layer_index_2;
Expand Down
2 changes: 1 addition & 1 deletion Pinta.Core/HistoryItems/TextHistoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Pinta.Core
{
public class TextHistoryItem : BaseHistoryItem
public sealed class TextHistoryItem : BaseHistoryItem
{
readonly UserLayer userLayer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace Pinta.Core
{
public class UpdateLayerPropertiesHistoryItem : BaseHistoryItem
public sealed class UpdateLayerPropertiesHistoryItem : BaseHistoryItem
{
readonly int layer_index;
readonly LayerProperties initial_properties;
Expand Down

0 comments on commit 32f4689

Please sign in to comment.