related to EXT-2515 "Docked floaters should be resizeable"

avoid undock floater when resize initiated not by user

--HG--
branch : product-engine
master
Alexei Arabadji 2009-11-18 11:35:11 +02:00
parent c76ab6c4b7
commit 215b95eb64
3 changed files with 6 additions and 11 deletions

View File

@ -206,16 +206,6 @@ void LLDockableFloater::draw()
LLFloater::draw();
}
void LLDockableFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
{
if (isDocked())
{
setDocked(false);
}
LLFloater::reshape(width, height, called_from_parent);
}
void LLDockableFloater::setDockControl(LLDockControl* dockControl)
{
mDockControl.reset(dockControl);

View File

@ -65,7 +65,6 @@ public:
/* virtula */BOOL postBuild();
/* virtual */void setDocked(bool docked, bool pop_on_undock = true);
/* virtual */void draw();
/* virtual */void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/**
* If descendant class overrides setVisible() then it must still invoke its

View File

@ -135,6 +135,12 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
LLView* resizing_view = getParent();
if( resizing_view )
{
// undock floater when user resize it
if (((LLFloater*)getParent())->isDocked())
{
((LLFloater*)getParent())->setDocked(false, false);
}
// Resize the parent
LLRect orig_rect = resizing_view->getRect();
LLRect scaled_rect = orig_rect;