diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-02 19:46:13 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-02 19:47:47 +0200 |
| commit | d042ad67ed4db72bf0265804e26610e565f15cf2 (patch) | |
| tree | b7e56c09077657775e2a28aed5c26c0c6d140fbd /indra/newview/llmaterialeditor.cpp | |
| parent | 32cc9a71d0e71bba96555558275a684501493e83 (diff) | |
SL-18448 Make material editor's scroll smarter
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 792a916e6b..cf627cf992 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -443,6 +443,20 @@ void LLMaterialEditor::onClose(bool app_quitting) LLPreview::onClose(app_quitting); } +void LLMaterialEditor::handleReshape(const LLRect& new_rect, bool by_user) +{ + if (by_user) + { + const LLRect old_rect = getRect(); + LLRect clamp_rect(new_rect); + clamp_rect.mRight = clamp_rect.mLeft + old_rect.getWidth(); + LLPreview::handleReshape(clamp_rect, by_user); + } + else + { + LLPreview::handleReshape(new_rect, by_user); + } +} LLUUID LLMaterialEditor::getBaseColorId() { @@ -648,7 +662,7 @@ void LLMaterialEditor::resetUnsavedChanges() void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag) { mUnsavedChanges |= dirty_flag; - if (!mIsOverride) + if (mIsOverride) { // at the moment live editing (mIsOverride) applies everything 'live' // and "unsaved_changes", save/cancel buttons don't exist there |
