diff options
Diffstat (limited to 'indra/llui/lldockablefloater.cpp')
-rw-r--r-- | indra/llui/lldockablefloater.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 228d0e701f..f56cb2eee7 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -99,7 +99,7 @@ void LLDockableFloater::toggleInstance(const LLSD& sdname) { instance->setMinimized(FALSE); instance->setVisible(TRUE); - instance->setFocus(TRUE); + gFloaterView->bringToFront(instance); } } @@ -136,11 +136,29 @@ void LLDockableFloater::setMinimized(BOOL minimize) { setVisible(FALSE); } - setCanDock(!minimize); + + if (minimize) + { + setCanDock(false); + } + else if (!minimize && mDockControl.get() != NULL && mDockControl.get()->isDockVisible()) + { + setCanDock(true); + } LLFloater::setMinimized(minimize); } +LLView * LLDockableFloater::getDockWidget() +{ + LLView * res = NULL; + if (getDockControl() != NULL) { + res = getDockControl()->getDock(); + } + + return res; +} + void LLDockableFloater::onDockHidden() { setCanDock(FALSE); @@ -148,7 +166,10 @@ void LLDockableFloater::onDockHidden() void LLDockableFloater::onDockShown() { - setCanDock(TRUE); + if (!isMinimized()) + { + setCanDock(TRUE); + } } void LLDockableFloater::setDocked(bool docked, bool pop_on_undock) |