Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts: # indra/newview/lltoolbarview.cppmaster
commit
b84ea39dba
|
|
@ -1258,7 +1258,7 @@ bool LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
|
|||
// if drop is set, it's time to call the callback to get the operation done
|
||||
if (handled && drop)
|
||||
{
|
||||
handled = mHandleDropCallback(cargo_data, x, y, this);
|
||||
handled = mHandleDropCallback(cargo_data, cargo_type, x, y, this);
|
||||
}
|
||||
|
||||
// We accept only single tool drop on toolbars
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class LLIconCtrl;
|
|||
|
||||
typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t;
|
||||
typedef boost::function<bool (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t;
|
||||
typedef boost::function<bool (void* data, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t;
|
||||
typedef boost::function<bool (void* data, EDragAndDropType cargo_type, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t;
|
||||
|
||||
class LLToolBarButton : public LLButton
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ bool LLFloaterToybox::postBuild()
|
|||
|
||||
mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
|
||||
mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
|
||||
mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
|
||||
mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4,_5));
|
||||
mToolBar->setButtonEnterCallback(boost::bind(&LLFloaterToybox::onToolBarButtonEnter,this,_1));
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -359,6 +359,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
|
|||
{
|
||||
if (asset_id.isNull() || override_json.empty())
|
||||
{
|
||||
// If there is no asset, there can't be an override
|
||||
queueApply(obj, side, asset_id);
|
||||
}
|
||||
else
|
||||
|
|
@ -371,6 +372,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
|
|||
{
|
||||
if (asset_id.isNull() || material_override == nullptr)
|
||||
{
|
||||
// If there is no asset, there can't be an override
|
||||
queueApply(obj, side, asset_id);
|
||||
}
|
||||
else
|
||||
|
|
@ -470,7 +472,7 @@ void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr<CallbackHolder> callba
|
|||
{
|
||||
data[i]["gltf_json"] = e.override_data->asJSON();
|
||||
}
|
||||
if (!e.override_json.empty())
|
||||
else if (!e.override_json.empty())
|
||||
{
|
||||
data[i]["gltf_json"] = e.override_json;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,13 +126,15 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id)
|
|||
LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
|
||||
{
|
||||
LLScriptFloater* floater = LLFloaterReg::getTypedInstance<LLScriptFloater>("script_floater", notification_id);
|
||||
if (floater)
|
||||
{
|
||||
floater->setNotificationId(notification_id);
|
||||
floater->createForm(notification_id);
|
||||
|
||||
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
|
||||
floater->setAutoFocus(false);
|
||||
|
||||
if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
|
||||
if (LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
|
||||
{
|
||||
floater->setSavePosition(true);
|
||||
floater->restorePosition();
|
||||
|
|
@ -144,7 +146,7 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
|
|||
|
||||
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
|
||||
LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, false);
|
||||
|
||||
}
|
||||
return floater;
|
||||
}
|
||||
// </FS:Zi>
|
||||
|
|
|
|||
|
|
@ -2411,23 +2411,9 @@ void LLSelectMgr::selectionRevertGLTFMaterials()
|
|||
//blank override out
|
||||
LLGLTFMaterialList::queueApply(objectp, te, asset_id);
|
||||
}
|
||||
if (old_asset_id != asset_id)
|
||||
{
|
||||
// Restore overrides and base material
|
||||
// Note: might not work reliably if asset is already there, might
|
||||
// have a server sided problem where servers applies override
|
||||
// first then resets it by adding asset, in which case need
|
||||
// to create a server ticket and chain asset then override
|
||||
// application.
|
||||
LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Enqueue override update to server
|
||||
// Note: this is suboptimal, better to send asset id as well
|
||||
// but there seems to be a server problem with queueApply
|
||||
// that ignores override in some cases
|
||||
LLGLTFMaterialList::queueModify(objectp, te, material);
|
||||
LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ bool LLToolBarView::postBuild()
|
|||
{
|
||||
mToolbars[i]->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
|
||||
mToolbars[i]->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
|
||||
mToolbars[i]->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
|
||||
mToolbars[i]->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4,_5));
|
||||
mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1));
|
||||
mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1));
|
||||
}
|
||||
|
|
@ -737,8 +737,14 @@ bool LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
|
|||
return false;
|
||||
}
|
||||
|
||||
bool LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar)
|
||||
bool LLToolBarView::handleDropTool( void* cargo_data, EDragAndDropType cargo_type, S32 x, S32 y, LLToolBar* toolbar)
|
||||
{
|
||||
if (cargo_type == DAD_PERSON)
|
||||
{
|
||||
// DAD_PERSON means that cargo_data contains an uuid, not an LLInventoryObject
|
||||
resetDragTool(NULL);
|
||||
return false;
|
||||
}
|
||||
// <FS:Zi> Do not drag and drop when toolbars are locked
|
||||
if(gSavedSettings.getBOOL("LockToolbars"))
|
||||
{
|
||||
|
|
@ -767,6 +773,8 @@ bool LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
|
|||
if (old_toolbar_loc != LLToolBarEnums::TOOLBAR_NONE)
|
||||
{
|
||||
llassert(gToolBarView->mDragToolbarButton);
|
||||
if (gToolBarView->mDragToolbarButton)
|
||||
{
|
||||
old_toolbar = gToolBarView->mDragToolbarButton->getParentByType<LLToolBar>();
|
||||
if (old_toolbar->isReadOnly() && toolbar->isReadOnly())
|
||||
{
|
||||
|
|
@ -778,6 +786,7 @@ bool LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
|
|||
gToolBarView->removeCommand(command_id, old_rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Convert the (x,y) position in rank in toolbar
|
||||
if (!toolbar->isReadOnly())
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
|
||||
static bool handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
|
||||
static bool handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
|
||||
static bool handleDropTool(void* cargo_data, EDragAndDropType cargo_type, S32 x, S32 y, LLToolBar* toolbar);
|
||||
static void resetDragTool(LLToolBarButton* toolbarButton);
|
||||
LLInventoryObject* getDragItem();
|
||||
LLView* getBottomToolbar() { return mBottomToolbarPanel; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue