diff options
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index f77275fd1c..cf759dd8f7 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -114,6 +114,35 @@ void LLSidepanelAppearance::onClickConfirmExitWithoutSaveViaClose() } } + +bool LLSidepanelAppearance::callBackExitWithoutSaveIntoAppearance(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( option == 0 ) + { + //revert current edits + mEditWearable->revertChanges(); + toggleWearableEditPanel(FALSE); + LLVOAvatarSelf::onCustomizeEnd( FALSE ); + //mLLFloaterSidePanelContainer->close(); + showOutfitsInventoryPanel(); + return true; + } + return false; +} + +void LLSidepanelAppearance::onClickConfirmExitWithoutSaveIntoAppearance() +{ + if ( LLAppearanceMgr::getInstance()->isOutfitDirty() && !LLAppearanceMgr::getInstance()->isOutfitLocked() ) + { + LLSidepanelAppearance* pSelf = (LLSidepanelAppearance *)this; + LLNotificationsUtil::add("ConfirmExitWithoutSave", LLSD(), LLSD(), boost::bind(&LLSidepanelAppearance::callBackExitWithoutSaveIntoAppearance,pSelf,_1,_2) ); + } + else + { + showOutfitsInventoryPanel(); + } +} void LLSidepanelAppearance::onClickConfirmExitWithoutSaveViaBack() { if ( LLAppearanceMgr::getInstance()->isOutfitDirty() && !mSidePanelJustOpened /*&& !LLAppearanceMgr::getInstance()->isOutfitLocked()*/ ) @@ -629,3 +658,8 @@ void LLSidepanelAppearance::updateScrollingPanelList() mEditWearable->updateScrollingPanelList(); } } + +bool LLSidepanelAppearance::checkForDirtyEdits() +{ + return ( mEditWearable->isDirty() ) ? true : false; +}
\ No newline at end of file |