mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-10 01:46:24 +00:00
Somewhat reduce flickering on select changes
This commit is contained in:
parent
00cc08bb05
commit
09806d5f14
1 changed files with 18 additions and 0 deletions
|
@ -23,6 +23,8 @@ namespace NBTExplorer.Vendor.MultiSelectTreeView
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
BeginUpdate();
|
||||||
|
|
||||||
ClearSelectedNodes();
|
ClearSelectedNodes();
|
||||||
if( value != null )
|
if( value != null )
|
||||||
{
|
{
|
||||||
|
@ -31,6 +33,8 @@ namespace NBTExplorer.Vendor.MultiSelectTreeView
|
||||||
ToggleNode( node, true );
|
ToggleNode( node, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EndUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +57,8 @@ namespace NBTExplorer.Vendor.MultiSelectTreeView
|
||||||
|
|
||||||
public MultiSelectTreeView()
|
public MultiSelectTreeView()
|
||||||
{
|
{
|
||||||
|
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
|
||||||
m_SelectedNodes = new List<TreeNode>();
|
m_SelectedNodes = new List<TreeNode>();
|
||||||
base.SelectedNode = null;
|
base.SelectedNode = null;
|
||||||
}
|
}
|
||||||
|
@ -581,5 +587,17 @@ namespace NBTExplorer.Vendor.MultiSelectTreeView
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private const int WM_ERASEBKGND = 0x14;
|
||||||
|
|
||||||
|
protected override void WndProc (ref Message m)
|
||||||
|
{
|
||||||
|
if (m.Msg == WM_ERASEBKGND) //if message is is erase background
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue