Make sure that when we open pictures they stay on screen

This commit is contained in:
Liru Færs
2019-11-24 00:33:50 -05:00
parent 84081286f0
commit ef5c9f0175

View File

@@ -66,7 +66,9 @@ void show_picture(const LLUUID& id, const std::string& name)
S32 left, top;
gFloaterView->getNewFloaterPosition(&left, &top);
LLRect rect = gSavedSettings.getRect("PreviewTextureRect");
(new LLPreviewTexture("preview texture", rect.translate(left - rect.mLeft, rect.mTop - top), name, id))->setFocus(true);
auto preview = new LLPreviewTexture("preview texture", rect.translate(left - rect.mLeft, rect.mTop - top), name, id);
preview->setFocus(true);
gFloaterView->adjustToFitScreen(preview, false);
}
//static