[Pkg-cli-apps-commits] [SCM] pinta branch, master, updated. debian/0.4+dfsg-1-8-g7aaf558
Maia Kozheva
sikon at ubuntu.com
Tue Jul 27 10:42:42 UTC 2010
The following commit has been merged in the master branch:
commit 85bd4822778071290fc5930bc54bb3f7d31872ab
Author: Maia Kozheva <sikon at ubuntu.com>
Date: Tue Jul 27 17:07:56 2010 +0700
Fix exceptions and data loss when clicking two mouse buttons while drawing
diff --git a/debian/patches/tools_exceptions_and_history_corruption.patch b/debian/patches/tools_exceptions_and_history_corruption.patch
new file mode 100644
index 0000000..02df93e
--- /dev/null
+++ b/debian/patches/tools_exceptions_and_history_corruption.patch
@@ -0,0 +1,46 @@
+Description: Fix exceptions and data loss when clicking two mouse buttons while drawing
+ Fixes exceptions and history corruption that can occur when clicking two
+ mouse buttons at once with the gradient and selection tools.
+Bug: https://launchpad.net/bugs/599468
+Origin: upstream, http://github.com/jpobst/Pinta/commit/1578683a943f367e3725f1f431855d765e5de3bd
+Author: Maia Kozheva <sikon at ubuntu.com>
+diff --git a/Pinta.Tools/SelectTool.cs b/Pinta.Tools/SelectTool.cs
+index 2d33808..b2496ea 100644
+--- a/Pinta.Tools/SelectTool.cs
++++ b/Pinta.Tools/SelectTool.cs
+@@ -46,6 +46,10 @@ namespace Pinta.Tools
+ #region Mouse Handlers
+ protected override void OnMouseDown (DrawingArea canvas, ButtonPressEventArgs args, Cairo.PointD point)
+ {
++ // Ignore extra button clicks while drawing
++ if (is_drawing)
++ return;
++
+ shape_origin = point;
+ is_drawing = true;
+
+diff --git a/Pinta.Tools/GradientTool.cs b/Pinta.Tools/GradientTool.cs
+index c7e3d3a..824696e 100644
+--- a/Pinta.Tools/GradientTool.cs
++++ b/Pinta.Tools/GradientTool.cs
+@@ -67,6 +67,10 @@ namespace Pinta.Tools
+ #region mouse
+ protected override void OnMouseDown (Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point)
+ {
++ // Protect against history corruption
++ if (tracking)
++ return;
++
+ base.OnMouseDown (canvas, args, point);
+ startpoint = point;
+ tracking = true;
+@@ -76,6 +80,9 @@ namespace Pinta.Tools
+
+ protected override void OnMouseUp (Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point)
+ {
++ if (!tracking || args.Event.Button != button)
++ return;
++
+ base.OnMouseUp (canvas, args, point);
+ tracking = false;
+ PintaCore.History.PushNewItem (new SimpleHistoryItem (Icon, Name, undo_surface, PintaCore.Layers.CurrentLayerIndex));
--
pinta
More information about the Pkg-cli-apps-commits
mailing list