diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 0eff177701..89813cbb16 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -118,9 +118,13 @@ protected: LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS]; LLSafeHandle mObjectSelection; + + // FIRE-16812: Remember last amount paid + static S32 sLastAmount; }; - +// FIRE-16812: Remember last amount paid +S32 LLFloaterPay::sLastAmount = 0; const S32 FASTPAY_BUTTON_WIDTH = 80; // FIRE-16092: Make payment confirmation customizable //const S32 PAY_AMOUNT_NOTIFICATION = 200; @@ -197,6 +201,14 @@ BOOL LLFloaterPay::postBuild() getChild("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); getChild("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); + // FIRE-16812: Remember last amount paid + std::string last_amount; + if (sLastAmount > 0) + { + last_amount = llformat("%d", sLastAmount); + } + getChild("amount")->setValue(last_amount); + // info = new LLGiveMoneyInfo(this, 0); mCallbackData.push_back(info); @@ -204,7 +216,10 @@ BOOL LLFloaterPay::postBuild() childSetAction("pay btn",&LLFloaterPay::onGive,info); setDefaultBtn("pay btn"); getChildView("pay btn")->setVisible(FALSE); - getChildView("pay btn")->setEnabled(FALSE); + // FIRE-16812: Remember last amount paid + //getChildView("pay btn")->setEnabled(FALSE); + getChildView("pay btn")->setEnabled((sLastAmount > 0)); + // childSetAction("cancel btn",&LLFloaterPay::onCancel,this); @@ -549,6 +564,8 @@ void LLFloaterPay::give(S32 amount) { amount = atoi(getChild("amount")->getValue().asString().c_str()); } + // FIRE-16812: Remember last amount paid + sLastAmount = amount; // Try to pay an object. if (mObjectSelection.notNull())