Revision 07b157c3 trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs
b/trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs | ||
---|---|---|
153 | 153 |
Directories = ownFolders.ToList() |
154 | 154 |
}; |
155 | 155 |
|
156 |
this.RootNodes.Add(rootItem); |
|
157 |
this.RootNodes.Add(othersNode); |
|
156 |
Execute.OnUIThread(() => |
|
157 |
{ |
|
158 |
this.RootNodes.Add(rootItem); |
|
159 |
this.RootNodes.Add(othersNode); |
|
160 |
}); |
|
158 | 161 |
|
159 | 162 |
SetInitialSelections(Account); |
160 | 163 |
|
... | ... | |
178 | 181 |
|
179 | 182 |
if (selections.Count == 0) |
180 | 183 |
return; |
181 |
|
|
184 |
//Initially, all nodes are checked |
|
185 |
//We need to *uncheck* the nodes that are not selected |
|
186 |
|
|
182 | 187 |
var selects = from rootRecord in RootNodes |
183 | 188 |
from record in rootRecord |
184 |
where record.Uri !=null && selections.Contains(record.Uri.ToString()) |
|
189 |
where record.Uri !=null && !selections.Contains(record.Uri.ToString())
|
|
185 | 190 |
select record; |
186 | 191 |
|
187 |
selects.Apply(record=>record.IsChecked=true);
|
|
192 |
selects.Apply(record=>record.IsChecked=false);
|
|
188 | 193 |
} |
189 | 194 |
|
190 | 195 |
protected string AccountName { get; set; } |
Also available in: Unified diff