Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1422710, 1422715 - Fix use of Recolor tool after use of Editable sh... #88

Merged
merged 2 commits into from
Feb 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions Pinta.Tools/Editable/EditEngines/BaseEditEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ public ShapeEngine SelectedShapeEngine
//Stores the editable shape data.
public static ShapeEngineCollection SEngines = new ShapeEngineCollection();

protected static bool usedToolLayer = false;


#region ToolbarEventHandlers

Expand Down Expand Up @@ -1213,12 +1211,7 @@ public void DrawActiveShape(bool calculateOrganizedPoints, bool finalize, bool d
private void beforeDraw()
{
//Clear the ToolLayer if it was used previously (e.g. for hover points when there was no active shape).
if (usedToolLayer)
{
PintaCore.Workspace.ActiveDocument.ToolLayer.Clear();

usedToolLayer = false;
}
PintaCore.Workspace.ActiveDocument.ToolLayer.Clear();

//Invalidate the old hover point bounds, if any.
if (lastHover != null)
Expand Down Expand Up @@ -1256,8 +1249,6 @@ private void drawTemporaryHoverPoint()

//Draw the hover point. Note: the hover point has its own invalidation.
drawHoverPoint(g);

usedToolLayer = true;
}

doc.ToolLayer.Hidden = false;
Expand Down Expand Up @@ -1711,6 +1702,9 @@ protected void finalizeAllShapes()
invalidateAfterDraw(dirty.Value);
}

// Ensure the ToolLayer gets hidden now that we're done with it
doc.ToolLayer.Hidden = true;

//Clear out all of the data.
resetShapes();
}
Expand Down