[longomatch] Don't expand/collapse playlists row after drags
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Don't expand/collapse playlists row after drags
- Date: Wed, 11 Feb 2015 15:59:23 +0000 (UTC)
commit 8d6bcfc82e9c825ce4fa07df4e8a1f49a54b951c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Feb 11 15:39:41 2015 +0100
Don't expand/collapse playlists row after drags
LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
index 90161e1..022b752 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
@@ -38,6 +38,7 @@ namespace LongoMatch.Gui.Component
TreePath pathClicked;
Playlist dragSourcePlaylist;
IPlaylistElement dragSourceElement;
+ bool dragStarted;
public PlayListTreeView ()
{
@@ -320,12 +321,13 @@ namespace LongoMatch.Gui.Component
Selection.GetSelected (out selectedIter);
FillElementAndPlaylist (selectedIter, out dragSourcePlaylist,
out dragSourceElement);
+ dragStarted = true;
base.OnDragBegin (context);
}
protected override bool OnButtonReleaseEvent (Gdk.EventButton evnt)
{
- if (pathClicked != null) {
+ if (pathClicked != null && !dragStarted) {
if (GetRowExpanded (pathClicked)) {
CollapseRow (pathClicked);
} else {
@@ -335,6 +337,12 @@ namespace LongoMatch.Gui.Component
}
return base.OnButtonReleaseEvent (evnt);
}
+
+ protected override void OnDragEnd (DragContext context)
+ {
+ base.OnDragEnd (context);
+ dragStarted = false;
+ }
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]