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();
|
onChangeBgScope();
|
||||||
onChangeGridScope();
|
onChangeGridScope();
|
||||||
sectionListbox()->selectIndex(m_curSection);
|
|
||||||
|
|
||||||
// Aseprite format preferences
|
// Aseprite format preferences
|
||||||
celFormat()->setSelectedItemIndex(int(m_pref.asepriteFormat.celFormat()));
|
celFormat()->setSelectedItemIndex(int(m_pref.asepriteFormat.celFormat()));
|
||||||
|
@ -1046,6 +1045,9 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void onOpen(Event& evt) override { sectionListbox()->selectIndex(m_curSection); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onInitTheme(InitThemeEvent& ev) override
|
void onInitTheme(InitThemeEvent& ev) override
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ void Panel::onResize(ResizeEvent& ev)
|
||||||
// Set all the children to the same "cpos"
|
// Set all the children to the same "cpos"
|
||||||
gfx::Rect cpos = childrenBounds();
|
gfx::Rect cpos = childrenBounds();
|
||||||
for (auto child : children()) {
|
for (auto child : children()) {
|
||||||
if (!child->isDecorative())
|
if (!child->isDecorative() && child->isVisible())
|
||||||
child->setBounds(cpos);
|
child->setBounds(cpos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue