diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-04-03 18:41:31 -0700 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-04-03 18:41:31 -0700 |
| commit | 081977308d6576f100df4bda03e6928faf520bc5 (patch) | |
| tree | 300e64d202523a5af12f463b693aed12f4761b1a /indra/newview/llpanelvolume.cpp | |
| parent | e364715a68f4d8384961d669ad6e7039e5c5d8b6 (diff) | |
PATH-454: BUGFIX Adding a notification when switching a permanent object to Flexible Path.
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
| -rw-r--r-- | indra/newview/llpanelvolume.cpp | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 557daeaec2..d277ded636 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,6 +68,7 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "llnotificationsutil.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -77,13 +78,15 @@ #include "llviewercontrol.h" #include "llmeshrepository.h" +#include <boost/bind.hpp> + // "Features" Tab BOOL LLPanelVolume::postBuild() { // Flexible Objects Parameters { - childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this); + childSetCommitCallback("Flexible1D Checkbox Ctrl", boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL); childSetCommitCallback("FlexNumSections",onCommitFlexible,this); getChild<LLUICtrl>("FlexNumSections")->setValidateBeforeCommit(precommitValidate); childSetCommitCallback("FlexGravity",onCommitFlexible,this); @@ -873,10 +876,26 @@ void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata ) self->refresh(); } -// static -void LLPanelVolume::onCommitIsFlexible( LLUICtrl* ctrl, void* userdata ) +void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*) { - LLPanelVolume* self = (LLPanelVolume*) userdata; - self->sendIsFlexible(); + if (mObject->flagObjectPermanent()) + { + LLNotificationsUtil::add("PathfindingLinksets_ChangeToFlexiblePath", LLSD(), LLSD(), boost::bind(&LLPanelVolume::handleResponseChangeToFlexible, this, _1, _2)); + } + else + { + sendIsFlexible(); + } } +void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
+ {
+ sendIsFlexible();
+ }
+ else
+ {
+ getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(FALSE);
+ }
+} |
