Fix problem with Item Selected. Fixes problem so that Item selected stays selected even if it is not active.

Also, makes DSOFramer properly select the related tab when it becomes active.
This commit is contained in:
Rich
2008-02-26 16:20:00 +00:00
parent f6bb58d4d4
commit ee9acb929d
6 changed files with 88 additions and 43 deletions

View File

@@ -156,11 +156,28 @@ namespace Volian.Controls.Library
ExpandAsNeeded(item);
ItemLookup[id].ItemSelect();
}
private ItemInfo _LastItemSelected;
internal ItemInfo LastItemSelected
private DisplayRTB _DisplayRTB = null;
public DisplayRTB DisplayRTB
{
get { return _LastItemSelected; }
get { return _DisplayRTB; }
set
{
if (_DisplayRTB == value) return; // Same - No Change
if (_DisplayRTB != null)
{
_DisplayRTB.BackColor = InactiveColor;
_DisplayRTB.SaveText(); // Save any changes to the text
}
_DisplayRTB = value;
_DisplayRTB.BackColor = ActiveColor;
}
}
//private ItemInfo _LastItemSelected;
//internal ItemInfo LastItemSelected
//{
// get { return _LastItemSelected; }
//}
internal ItemInfo _ItemSelected;
public ItemInfo ItemSelected
{
@@ -168,12 +185,12 @@ namespace Volian.Controls.Library
set
{
_ItemSelected = value;
if (value == null)
{
OnItemSelectedChanged(this, null);
return;
}
_LastItemSelected = value;
//if (value == null)
//{
// OnItemSelectedChanged(this, null);
// return;
//}
//_LastItemSelected = value;
int id = value.ItemID;
ExpandAsNeeded(value);
ItemLookup[id].ItemSelect();
@@ -182,12 +199,12 @@ namespace Volian.Controls.Library
}
public DisplayItem DisplayItemSelected
{
get { return (_ItemSelected != null)?ItemLookup[_ItemSelected.ItemID]:null; }
get { return (_ItemSelected != null) ? ItemLookup[_ItemSelected.ItemID] : null; }
}
public void ItemShow()
{
if (_LastItemSelected != null)
ItemLookup[_LastItemSelected.ItemID].ItemShow();
if (_ItemSelected != null)
ItemLookup[_ItemSelected.ItemID].ItemShow();
}
private int _Scrolling = 0; // Volian Property Snippet
public int Scrolling