Setting through LLView::userSetShape now done through LLView::setShape. LLView::snappedTo renamed to LLView::setSnappedTo. virtual overriding of LLView::userSetShape now done through LLView::handleReshape which LLView::setShape calls.

This commit is contained in:
Shyotl
2011-07-17 19:59:30 -05:00
parent 66336e8151
commit 3e9c23e43b
15 changed files with 67 additions and 54 deletions

View File

@@ -530,13 +530,14 @@ LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id)
return NULL;
}
void LLPreview::userSetShape(const LLRect& new_rect)
void LLPreview::handleReshape(const LLRect& new_rect, bool by_user)
{
if(new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight())
if(by_user
&& (new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight()))
{
userResized();
}
LLFloater::userSetShape(new_rect);
LLFloater::handleReshape(new_rect, by_user);
}
//
@@ -559,14 +560,14 @@ void LLMultiPreview::open() /*Flawfinder: ignore*/
}
void LLMultiPreview::userSetShape(const LLRect& new_rect)
void LLMultiPreview::handleReshape(const LLRect& new_rect, bool by_user)
{
if(new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight())
{
LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
if (frontmost_preview) frontmost_preview->userResized();
}
LLFloater::userSetShape(new_rect);
LLFloater::handleReshape(new_rect, by_user);
}