mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Show "Loading..." item in DataRecoveryView if the list wasn't loaded before we click the "Recover Files..." option
This commit is contained in:
parent
54883012bb
commit
df741c246b
@ -1208,6 +1208,7 @@ delete = Delete
|
||||
refresh = Refresh
|
||||
raw_images_as_frames = Raw Images as Frames
|
||||
raw_images_as_layers = Raw Images as Layers
|
||||
loading = Loading...
|
||||
crash_sessions = Crashed Sessions
|
||||
old_sessions = Previous Sessions
|
||||
incompatible = [MIGHT BE INCOMPATIBLE v{1}] {0}
|
||||
|
@ -33,6 +33,8 @@ namespace crash {
|
||||
// Launches the thread to search for sessions.
|
||||
void launchSearch();
|
||||
|
||||
bool isSearching() const { return m_searching; }
|
||||
|
||||
// Returns true if there is at least one sessions with sprites to
|
||||
// recover (i.e. a crashed session were changes weren't saved)
|
||||
bool hasRecoverySessions() const;
|
||||
|
@ -130,8 +130,13 @@ void DataRecoveryView::clearList()
|
||||
void DataRecoveryView::fillList()
|
||||
{
|
||||
clearList();
|
||||
|
||||
if (m_dataRecovery->isSearching())
|
||||
m_listBox.addChild(new ListItem(Strings::recover_files_loading()));
|
||||
else {
|
||||
fillListWith(true);
|
||||
fillListWith(false);
|
||||
}
|
||||
}
|
||||
|
||||
void DataRecoveryView::fillListWith(const bool crashes)
|
||||
@ -296,12 +301,11 @@ void DataRecoveryView::onDelete()
|
||||
|
||||
void DataRecoveryView::onRefresh()
|
||||
{
|
||||
clearList();
|
||||
onChangeSelection();
|
||||
m_listBox.addChild(new ListItem("Loading..."));
|
||||
layout();
|
||||
|
||||
m_dataRecovery->launchSearch();
|
||||
|
||||
fillList();
|
||||
onChangeSelection();
|
||||
layout();
|
||||
}
|
||||
|
||||
void DataRecoveryView::onChangeSelection()
|
||||
|
Loading…
Reference in New Issue
Block a user