[f-spot] keep the selection in the image while moving
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] keep the selection in the image while moving
- Date: Mon, 15 Jun 2009 10:27:19 -0400 (EDT)
commit 09dfdebe26ad6d47171f053ade964fe40c7b548d
Author: Stephane Delcroix <stephane delcroix org>
Date: Mon Jun 15 16:23:41 2009 +0200
keep the selection in the image while moving
src/Widgets/ImageView.cs | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index db6a95b..333d6d9 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -769,10 +769,6 @@ namespace FSpot.Widgets
{
return Math.Min (Math.Max (value, min), max);
}
-
- bool SelectionActive {
- get { return Selection == Rectangle.Zero ; }
- }
#endregion
#region children
@@ -965,8 +961,8 @@ namespace FSpot.Widgets
}
if (is_moving_selection) {
- Selection = new Rectangle (Selection.X + img.X - selection_anchor.X,
- Selection.Y + img.Y - selection_anchor.Y,
+ Selection = new Rectangle (Clamp (Selection.X + img.X - selection_anchor.X, 0, Pixbuf.Width - Selection.Width),
+ Clamp (Selection.Y + img.Y - selection_anchor.Y, 0, Pixbuf.Height - Selection.Height),
Selection.Width, Selection.Height);
selection_anchor = img;
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]