Skip to content

Commit 02b5869

Browse files
committed
A required hack to LLMediaCtrl due to our LLPanel behaving far too differently right now. (Clicking isn't passed through like it should, and LLMediaCtrl is not currently parsing xml files so postBuild is not called.)
1 parent 4987bce commit 02b5869

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

indra/newview/llmediactrl.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const S32 MAX_TEXTURE_DIMENSION = 2048;
6363
static LLRegisterWidget<LLMediaCtrl> r("web_browser");
6464

6565
LLMediaCtrl::LLMediaCtrl( const std::string& name, const LLRect& rect ) :
66-
LLPanel( name, rect, FALSE ),
66+
LLUICtrl( name, rect, FALSE, NULL, NULL),
6767
LLInstanceTracker<LLMediaCtrl, LLUUID>(LLUUID::generateNewID()),
6868
mTextureDepthBytes( 4 ),
6969
mWebBrowserImage( 0 ),
@@ -341,7 +341,7 @@ void LLMediaCtrl::onFocusLost()
341341

342342
BOOL LLMediaCtrl::postBuild ()
343343
{
344-
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
344+
//setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
345345
return true;
346346
}
347347

@@ -395,6 +395,9 @@ void LLMediaCtrl::handleVisibilityChange ( BOOL new_visibility )
395395
{
396396
mMediaSource->setVisible( new_visibility );
397397
}
398+
LLUICtrl::handleVisibilityChange( new_visibility );
399+
//Hack due to not being derived from LLPanel yet
400+
LLMediaCtrl::onVisibilityChange(LLSD(new_visibility));
398401
}
399402

400403
////////////////////////////////////////////////////////////////////////////////

indra/newview/llmediactrl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class LLUICtrlFactory;
4646
////////////////////////////////////////////////////////////////////////////////
4747
//
4848
class LLMediaCtrl :
49-
public LLPanel,
49+
public LLUICtrl,
5050
public LLViewerMediaObserver,
5151
public LLViewerMediaEventEmitter,
5252
public LLInstanceTracker<LLMediaCtrl, LLUUID>

0 commit comments

Comments
 (0)