Display pathfinding attributes in build floater.
This commit is contained in:
@@ -83,13 +83,17 @@
|
||||
#include "llviewercontrol.h"
|
||||
#include "llmeshrepository.h"
|
||||
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// "Features" Tab
|
||||
|
||||
BOOL LLPanelVolume::postBuild()
|
||||
{
|
||||
// Flexible Objects Parameters
|
||||
{
|
||||
childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this);
|
||||
getChild<LLCheckboxCtrl>("Flexible1D Checkbox Ctrl")->setCommitCallback(boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL);
|
||||
childSetCommitCallback("FlexNumSections",onCommitFlexible,this);
|
||||
getChild<LLUICtrl>("FlexNumSections")->setValidateBeforeCommit(precommitValidate);
|
||||
childSetCommitCallback("FlexGravity",onCommitFlexible,this);
|
||||
@@ -810,10 +814,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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user