fix a loading bug - set size if movie is passed into ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -93,7 +93,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
|||||||
|
|
||||||
if (!fileName.empty())
|
if (!fileName.empty())
|
||||||
{
|
{
|
||||||
if (!m_imp->Load(fileName))
|
if (!Load(fileName))
|
||||||
{
|
{
|
||||||
delete m_imp;
|
delete m_imp;
|
||||||
m_imp = NULL;
|
m_imp = NULL;
|
||||||
@@ -101,6 +101,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetBestFittingSize(size);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -117,13 +118,19 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
|||||||
|
|
||||||
if (!fileName.empty())
|
if (!fileName.empty())
|
||||||
{
|
{
|
||||||
if (m_imp->Load(fileName))
|
if (Load(fileName))
|
||||||
|
{
|
||||||
|
SetBestFittingSize(size);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
delete m_imp;
|
delete m_imp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
SetBestFittingSize(size);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
classInfo = NextBackend();
|
classInfo = NextBackend();
|
||||||
}
|
}
|
||||||
@@ -151,13 +158,14 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_imp->Load(location))
|
if (!Load(location))
|
||||||
{
|
{
|
||||||
delete m_imp;
|
delete m_imp;
|
||||||
m_imp = NULL;
|
m_imp = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetBestFittingSize(size);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -172,8 +180,11 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
|||||||
pos, size, style, validator, name))
|
pos, size, style, validator, name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (m_imp->Load(location))
|
if (Load(location))
|
||||||
|
{
|
||||||
|
SetBestFittingSize(size);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
delete m_imp;
|
delete m_imp;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user