Syncing small interface with large interface, small interface set selector immediately activates the new set.

master
ZiRee 2011-04-27 00:31:51 +02:00
parent 37b0ffd5be
commit 56b00375ca
1 changed files with 9 additions and 0 deletions

View File

@ -291,11 +291,17 @@ void FloaterAO::onSelectSet()
void FloaterAO::onSelectSetSmall()
{
// sync main set selector with small set selector
mSetSelector->selectNthItem(mSetSelectorSmall->getCurrentIndex());
mSelectedSet=AOEngine::instance().getSetByName(mSetSelectorSmall->getSelectedItemLabel());
if(mSelectedSet)
{
updateSetParameters();
updateAnimationList();
// small selector activates the selected set immediately
onClickActivate();
}
}
@ -332,6 +338,9 @@ void FloaterAO::onRenameSet()
void FloaterAO::onClickActivate()
{
// sync small set selector with main set selector
mSetSelectorSmall->selectNthItem(mSetSelector->getCurrentIndex());
lldebugs << "Set activated: " << mSetSelector->getSelectedItemLabel() << llendl;
AOEngine::instance().selectSet(mSelectedSet);
}