void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get(); // <edit> mEnable getEnabled() if( floaterp && mEnable) { mDirty = (op != TEXTURE_CANCEL); if( floaterp->isDirty() ) { setTentative( FALSE ); mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE); lldebugs << "mImageItemID: " << mImageItemID << llendl; mImageAssetID = floaterp->getAssetID(); lldebugs << "mImageAssetID: " << mImageAssetID << llendl; if (op == TEXTURE_SELECT && mOnSelectCallback) { mOnSelectCallback(this, mCallbackUserData); } else if (op == TEXTURE_CANCEL && mOnCancelCallback) { mOnCancelCallback(this, mCallbackUserData); } else { onCommit(); } } } }
void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get(); // mEnable getEnabled() if( floaterp && mEnable) { mDirty = (op != TEXTURE_CANCEL); if( floaterp->isDirty() ) { setTentative( FALSE ); mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE); LL_DEBUGS() << "mImageItemID: " << mImageItemID << LL_ENDL; mImageAssetID = floaterp->getAssetID(); LL_DEBUGS() << "mImageAssetID: " << mImageAssetID << LL_ENDL; if (op == TEXTURE_SELECT && mOnSelectCallback) { mOnSelectCallback( this, LLSD() ); } else if (op == TEXTURE_CANCEL && mOnCancelCallback) { mOnCancelCallback( this, LLSD() ); } else { onCommit(); } } } }
void LLCheckBoxCtrl::onCommit() { if( getEnabled() ) { setTentative(FALSE); LLUICtrl::onCommit(); } }
void LLSpinCtrl::onCommit() { setTentative(FALSE); setControlValue(mValue); LLUICtrl::onCommit(); }
void LLCheckBoxCtrl::onCommit() { if( getEnabled() ) { setTentative(FALSE); setControlValue(getValue()); LLUICtrl::onCommit(); } }
void LLSliderCtrl::onCommit() { setTentative(FALSE); if( mEditor ) { mEditor->setTentative(FALSE); } LLUICtrl::onCommit(); }
void LLMultiSliderCtrl::onCommit() { setTentative(FALSE); if( mEditor ) { mEditor->setTentative(FALSE); } setControlValue(getValueF32()); LLF32UICtrl::onCommit(); }
BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { BOOL handled = FALSE; // this downcast may be invalid - but if the second test below // returns true, then the cast was valid, and we can perform // the third test without problems. LLInventoryItem* item = (LLInventoryItem*)cargo_data; bool is_mesh = cargo_type == DAD_MESH; if (getEnabled() && ((cargo_type == DAD_TEXTURE) || is_mesh) && allowDrop(item)) { if (drop) { if(doDrop(item)) { if (!mCommitOnSelection) mViewModel->setDirty(); // This removes the 'Multiple' overlay, since // there is now only one texture selected. setTentative( FALSE ); onCommit(); } } *accept = ACCEPT_YES_SINGLE; } else { *accept = ACCEPT_NO; } handled = TRUE; lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLTextureCtrl " << getName() << llendl; return handled; }
void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get(); if( floaterp && getEnabled()) { if (op == TEXTURE_CANCEL) mViewModel->resetDirty(); // If the "no_commit_on_selection" parameter is set // we get dirty only when user presses OK in the picker // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. else if (mCommitOnSelection || op == TEXTURE_SELECT) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? if( floaterp->isDirty() ) { setTentative( FALSE ); mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE); lldebugs << "mImageItemID: " << mImageItemID << llendl; mImageAssetID = floaterp->getAssetID(); lldebugs << "mImageAssetID: " << mImageAssetID << llendl; if (op == TEXTURE_SELECT && mOnSelectCallback) { mOnSelectCallback( this, LLSD() ); } else if (op == TEXTURE_CANCEL && mOnCancelCallback) { mOnCancelCallback( this, LLSD() ); } else { // If the "no_commit_on_selection" parameter is set // we commit only when user presses OK in the picker // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. if (mCommitOnSelection || op == TEXTURE_SELECT) onCommit(); } } } }
BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { BOOL handled = FALSE; // this downcast may be invalid - but if the second test below // returns true, then the cast was valid, and we can perform // the third test without problems. LLInventoryItem* item = (LLInventoryItem*)cargo_data; // <edit> mEnable getEnabled() if (mEnable && (cargo_type == DAD_TEXTURE) && allowDrop(item)) { if (drop) { if(doDrop(item)) { // This removes the 'Multiple' overlay, since // there is now only one texture selected. setTentative( FALSE ); onCommit(); } } *accept = ACCEPT_YES_SINGLE; } else { *accept = ACCEPT_NO; } handled = TRUE; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << LL_ENDL; return handled; }
void LLSpinCtrl::onCommit() { setTentative(FALSE); setControlValue(getValueF32()); LLF32UICtrl::onCommit(); }