mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 12:40:50 +00:00
Fix scrolling bug at the bottom of palette list the first time it popups
This commit is contained in:
parent
7fe6037862
commit
6e5d312bdf
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2001-2015 David Capello
|
// Copyright (C) 2001-2016 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
@ -205,8 +205,7 @@ void ResourcesListBox::onTick()
|
|||||||
insertChild(getItemsCount()-1, listItem);
|
insertChild(getItemsCount()-1, listItem);
|
||||||
layout();
|
layout();
|
||||||
|
|
||||||
View* view = View::getView(this);
|
if (View* view = View::getView(this))
|
||||||
if (view)
|
|
||||||
view->updateView();
|
view->updateView();
|
||||||
|
|
||||||
resource.release();
|
resource.release();
|
||||||
@ -215,15 +214,18 @@ void ResourcesListBox::onTick()
|
|||||||
|
|
||||||
void ResourcesListBox::stop()
|
void ResourcesListBox::stop()
|
||||||
{
|
{
|
||||||
|
m_resourcesTimer.stop();
|
||||||
|
|
||||||
if (m_loadingItem) {
|
if (m_loadingItem) {
|
||||||
removeChild(m_loadingItem);
|
removeChild(m_loadingItem);
|
||||||
|
layout();
|
||||||
|
|
||||||
delete m_loadingItem;
|
delete m_loadingItem;
|
||||||
m_loadingItem = NULL;
|
m_loadingItem = nullptr;
|
||||||
|
|
||||||
invalidate();
|
if (View* view = View::getView(this))
|
||||||
|
view->updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_resourcesTimer.stop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace app
|
} // namespace app
|
||||||
|
Loading…
Reference in New Issue
Block a user