fix layout designer
This commit is contained in:
@@ -152,7 +152,7 @@ void NodeImage::load_url(const std::string& url)
|
||||
m_remote_texture->create_mipmaps();
|
||||
delete rgba;
|
||||
if (m_autosize)
|
||||
SetAspectRatio(w / h);
|
||||
SetAspectRatio((float)w / (float)h);
|
||||
}
|
||||
m_remote_asset.reset();
|
||||
}
|
||||
@@ -162,6 +162,6 @@ void NodeImage::load_url(const std::string& url)
|
||||
void NodeImage::added(Node* parent)
|
||||
{
|
||||
Node::added(parent);
|
||||
if (!m_url.empty() && root() == App::I->layout.get(App::I->main_id))
|
||||
if (!m_url.empty() && added_to_root())
|
||||
load_url(m_url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user