diff options
author | Callum Prentice <callum@lindenlab.com> | 2023-08-11 15:05:43 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2023-08-11 15:05:43 -0700 |
commit | 7d849810a4bfde4d700d42ef2f8154164d3a9278 (patch) | |
tree | 7c9bed985f015f5d30b776896099c70d700ac138 /indra/llui | |
parent | 263e097ef7772ddbb69f575e20b31fd801dafc8e (diff) | |
parent | 03db9132db54e9366305e79e63adc4fe2f4722dc (diff) |
Merge remote-tracking branch 'origin/DRTVWR-567' into viewer_bulky_thumbs
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 0093f4c17c..38a1a9a1ab 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -32,6 +32,7 @@ #include "llfolderview.h" #include "llfolderviewmodel.h" #include "llpanel.h" +#include "llcallbacklist.h" #include "llcriticaldamp.h" #include "llclipboard.h" #include "llfocusmgr.h" // gFocusMgr @@ -1844,7 +1845,12 @@ void LLFolderViewFolder::setOpen(BOOL openitem) { if(mSingleFolderMode) { - getViewModelItem()->navigateToFolder(); + // navigateToFolder can destroy this view + // delay it in case setOpen was called from click or key processing + doOnIdleOneTime([this]() + { + getViewModelItem()->navigateToFolder(); + }); } else { @@ -2074,7 +2080,19 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) if(mSingleFolderMode) { static LLUICachedControl<bool> double_click_new_window("SingleModeDoubleClickOpenWindow", false); - getViewModelItem()->navigateToFolder(double_click_new_window); + if (double_click_new_window) + { + getViewModelItem()->navigateToFolder(true); + } + else + { + // navigating is going to destroy views and change children + // delay it untill handleDoubleClick processing is complete + doOnIdleOneTime([this]() + { + getViewModelItem()->navigateToFolder(false); + }); + } return TRUE; } |