private void HandlePintaCoreActionsLayersDeleteLayerActivated(object sender, EventArgs e) { Document doc = PintaCore.Workspace.ActiveDocument; PintaCore.Tools.Commit(); DeleteLayerHistoryItem hist = new DeleteLayerHistoryItem("Menu.Layers.DeleteLayer.png", Catalog.GetString("Delete Layer"), doc.CurrentLayer, doc.CurrentLayerIndex); doc.DeleteLayer(doc.CurrentLayerIndex, false); doc.History.PushNewItem(hist); }
private void HandlePintaCoreActionsLayersDeleteLayerActivated(object sender, EventArgs e) { Document doc = PintaCore.Workspace.ActiveDocument; PintaCore.Tools.Commit(); DeleteLayerHistoryItem hist = new DeleteLayerHistoryItem(Resources.Icons.LayerDelete, Translations.GetString("Delete Layer"), doc.Layers.CurrentUserLayer, doc.Layers.CurrentUserLayerIndex); doc.Layers.DeleteLayer(doc.Layers.CurrentUserLayerIndex, false); doc.History.PushNewItem(hist); }
private void HandlePintaCoreActionsLayersMergeLayerDownActivated(object sender, EventArgs e) { Document doc = PintaCore.Workspace.ActiveDocument; PintaCore.Tools.Commit(); CompoundHistoryItem hist = new CompoundHistoryItem("Menu.Layers.MergeLayerDown.png", Catalog.GetString("Merge Layer Down")); DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem(string.Empty, string.Empty, doc.CurrentLayer, doc.CurrentLayerIndex); SimpleHistoryItem h2 = new SimpleHistoryItem(string.Empty, string.Empty, doc.Layers[doc.CurrentLayerIndex - 1].Surface.Clone(), doc.CurrentLayerIndex - 1); hist.Push(h1); hist.Push(h2); doc.MergeCurrentLayerDown(); doc.History.PushNewItem(hist); }
private void HandlePintaCoreActionsLayersMergeLayerDownActivated(object sender, EventArgs e) { Document doc = PintaCore.Workspace.ActiveDocument; PintaCore.Tools.Commit(); int bottomLayerIndex = doc.Layers.CurrentUserLayerIndex - 1; var oldBottomSurface = doc.Layers.UserLayers[bottomLayerIndex].Surface.Clone(); CompoundHistoryItem hist = new CompoundHistoryItem(Resources.Icons.LayerMergeDown, Translations.GetString("Merge Layer Down")); DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem(string.Empty, string.Empty, doc.Layers.CurrentUserLayer, doc.Layers.CurrentUserLayerIndex); doc.Layers.MergeCurrentLayerDown(); SimpleHistoryItem h2 = new SimpleHistoryItem(string.Empty, string.Empty, oldBottomSurface, bottomLayerIndex); hist.Push(h1); hist.Push(h2); doc.History.PushNewItem(hist); }
private void HandlePintaCoreActionsLayersMergeLayerDownActivated(object sender, EventArgs e) { Document doc = PintaCore.Workspace.ActiveDocument; PintaCore.Tools.Commit (); CompoundHistoryItem hist = new CompoundHistoryItem ("Menu.Layers.MergeLayerDown.png", Catalog.GetString ("Merge Layer Down")); DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.CurrentLayer, doc.CurrentLayerIndex); SimpleHistoryItem h2 = new SimpleHistoryItem (string.Empty, string.Empty, doc.Layers[doc.CurrentLayerIndex - 1].Surface.Clone (), doc.CurrentLayerIndex - 1); hist.Push (h1); hist.Push (h2); doc.MergeCurrentLayerDown (); doc.History.PushNewItem (hist); }
private void HandlePintaCoreActionsLayersDeleteLayerActivated(object sender, EventArgs e) { Document doc = PintaCore.Workspace.ActiveDocument; PintaCore.Tools.Commit (); DeleteLayerHistoryItem hist = new DeleteLayerHistoryItem ("Menu.Layers.DeleteLayer.png", Catalog.GetString ("Delete Layer"), doc.CurrentLayer, doc.CurrentLayerIndex); doc.DeleteLayer (doc.CurrentLayerIndex, false); doc.History.PushNewItem (hist); }
private void HandlePintaCoreActionsLayersMergeLayerDownActivated(object sender, EventArgs e) { PintaCore.Layers.FinishSelection (); CompoundHistoryItem hist = new CompoundHistoryItem ("Menu.Layers.MergeLayerDown.png", Mono.Unix.Catalog.GetString ("Merge Layer Down")); DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem (string.Empty, string.Empty, PintaCore.Layers.CurrentLayer, PintaCore.Layers.CurrentLayerIndex); SimpleHistoryItem h2 = new SimpleHistoryItem (string.Empty, string.Empty, PintaCore.Layers[PintaCore.Layers.CurrentLayerIndex - 1].Surface.Clone (), PintaCore.Layers.CurrentLayerIndex - 1); hist.Push (h1); hist.Push (h2); PintaCore.Layers.MergeCurrentLayerDown (); PintaCore.History.PushNewItem (hist); }
private void HandlePintaCoreActionsLayersDeleteLayerActivated(object sender, EventArgs e) { PintaCore.Layers.FinishSelection (); DeleteLayerHistoryItem hist = new DeleteLayerHistoryItem ("Menu.Layers.DeleteLayer.png", Mono.Unix.Catalog.GetString ("Delete Layer"), PintaCore.Layers.CurrentLayer, PintaCore.Layers.CurrentLayerIndex); PintaCore.Layers.DeleteLayer (PintaCore.Layers.CurrentLayerIndex, false); PintaCore.History.PushNewItem (hist); }