U4-580 Fixes an issue introduced by the bugfix for U4-580 in fdec8c2f6a62

The preview button got pushed out of view when the rte toolbar was loaded.
This commit is contained in:
timothy.beutels@bluecherry.be
2012-12-11 15:10:16 -01:00
parent d30791b8e0
commit 7d26ae520e
2 changed files with 39 additions and 1 deletions

View File

@@ -66,6 +66,27 @@ namespace umbraco.uicontrols {
Icons.Insert(Index, icon);
}
/// <summary>
/// Finds the index of the n-th Splitter in this Menu
/// </summary>
/// <param name="n"></param>
/// <returns>The index of the n-th Splitter, or -1 if the number of Splitters is smaller than n</returns>
public int FindSplitter(int n)
{
var count = 0;
for(var i=0; i<Icons.Count; i++)
{
if (Icons[i].GetType() == typeof(Splitter))
{
count++;
if (count == n)
return i;
}
}
return -1;
}
protected override void OnLoad(System.EventArgs EventArguments) {
if (base.Visible)