[banshee/stable-1.8] SmartPlaylistSource: Clear the condition when it's not enabled



commit 7c055ff5ebbe4fb0b6dd36ebdadb65930f4b1104
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sat Dec 18 15:40:39 2010 +0100

    SmartPlaylistSource: Clear the condition when it's not enabled
    
    If the ConditionTree is set to null, we need to also clear out the
    ConditionXml and ConditionSql. This prevents any previously existing
    condition from remaining in place. Fixes bgo#637365.

 .../Banshee.SmartPlaylist/SmartPlaylistSource.cs   |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
index 186861e..09c4a71 100644
--- a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
@@ -121,6 +121,9 @@ namespace Banshee.SmartPlaylist
                         if (!relevant_fields.Contains (term.Field))
                             relevant_fields.Add (term.Field);
                     }
+                } else {
+                    condition_sql = null;
+                    condition_xml = null;
                 }
             }
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]