mirror of https://github.com/aseprite/aseprite.git
Improve panel resizing performance
By avoiding calculating bounds for HIDDEN panel's children.
This commit is contained in:
parent
1519589184
commit
afbd28b3b4
|
@ -696,7 +696,6 @@ public:
|
|||
|
||||
onChangeBgScope();
|
||||
onChangeGridScope();
|
||||
sectionListbox()->selectIndex(m_curSection);
|
||||
|
||||
// Aseprite format preferences
|
||||
celFormat()->setSelectedItemIndex(int(m_pref.asepriteFormat.celFormat()));
|
||||
|
@ -1046,6 +1045,9 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
void onOpen(Event& evt) override { sectionListbox()->selectIndex(m_curSection); }
|
||||
|
||||
private:
|
||||
void onInitTheme(InitThemeEvent& ev) override
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ void Panel::onResize(ResizeEvent& ev)
|
|||
// Set all the children to the same "cpos"
|
||||
gfx::Rect cpos = childrenBounds();
|
||||
for (auto child : children()) {
|
||||
if (!child->isDecorative())
|
||||
if (!child->isDecorative() && child->isVisible())
|
||||
child->setBounds(cpos);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue