Browse Source

Removed the DeferChanges stuff for now.

pull/4/head
Steven Kirk 12 years ago
parent
commit
79f840d225
  1. 6
      Perspex/Controls/Control.cs
  2. 33
      Perspex/PerspexObject.cs

6
Perspex/Controls/Control.cs

@ -74,8 +74,6 @@ namespace Perspex.Controls
public Control() public Control()
{ {
this.classes = new Classes(); this.classes = new Classes();
this.classes.BeforeChanged.Subscribe(x => this.BeginDeferChanges());
this.classes.AfterChanged.Subscribe(x => this.EndDeferChanges());
this.GetObservable(IsMouseOverProperty).Subscribe(x => this.GetObservable(IsMouseOverProperty).Subscribe(x =>
{ {
@ -143,7 +141,7 @@ namespace Perspex.Controls
public Classes Classes public Classes Classes
{ {
get get
{ {
return this.classes; return this.classes;
} }
@ -151,10 +149,8 @@ namespace Perspex.Controls
{ {
if (this.classes != value) if (this.classes != value)
{ {
this.BeginDeferChanges();
this.classes.Clear(); this.classes.Clear();
this.classes.Add(value); this.classes.Add(value);
this.EndDeferChanges();
} }
} }
} }

33
Perspex/PerspexObject.cs

@ -123,39 +123,6 @@ namespace Perspex
} }
} }
/// <summary>
/// Defers property change notifications until <see cref="EndDeferChanges"/> is called.
/// </summary>
public void BeginDeferChanges()
{
//foreach (PriorityValue v in this.values.Values)
//{
// v.BeginDeferChanges();
//}
//this.Log().Debug(string.Format(
// "Defer style changes on {0} (#{1:x8})",
// this.GetType().Name,
// this.GetHashCode()));
}
/// <summary>
/// Ends the defer of property change notifications initiated by a previous call
/// to <see cref="BeginDeferChanges"/>.
/// </summary>
public void EndDeferChanges()
{
//foreach (PriorityValue v in this.values.Values)
//{
// v.EndDeferChanges();
//}
//this.Log().Debug(string.Format(
// "End defer style changes on {0} (#{1:x8})",
// this.GetType().Name,
// this.GetHashCode()));
}
/// <summary> /// <summary>
/// Gets all <see cref="PerspexProperty"/>s registered on a type. /// Gets all <see cref="PerspexProperty"/>s registered on a type.
/// </summary> /// </summary>

Loading…
Cancel
Save