[banshee] SmartPlaylistSource: Clear the condition when it's not enabled



commit 2210fe7a13ddec7e248929085470ec9df524cb15
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 2a7bf20..085166d 100644
--- a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
@@ -120,6 +120,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]