Skip to content

Commit

Permalink
Check if clearing project before sending loadingStarted signal.
Browse files Browse the repository at this point in the history
Suppose to fix stuck loading screen on deleting active project.
  • Loading branch information
vsklencar authored and wonder-sk committed Aug 20, 2019
1 parent eb49fad commit 56b4c3f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/loader.cpp
Expand Up @@ -54,6 +54,14 @@ void Loader::setRecording( bool isRecordingOn )
bool Loader::load( const QString &filePath )
{
qDebug() << "Loading " << filePath;
// Just clear project if empty
if ( filePath.isEmpty() )
{
mProject->clear();
emit projectReloaded();
return true;
}

emit loadingStarted();

// Give some time to other (GUI) processes before loading a project in the main thread
Expand All @@ -63,14 +71,6 @@ bool Loader::load( const QString &filePath )
t.start( 10 );
loop.exec();

// Just clear project if empty
if ( filePath.isEmpty() )
{
mProject->clear();
emit projectReloaded();
return true;
}

bool res = true;
if ( mProject->fileName() != filePath )
{
Expand Down

4 comments on commit 56b4c3f

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signed apk: armv7 (SDK: android-2)

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signed apk: arm64_v8a (SDK: android-2)

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signed apk: armv7 (SDK: android-2)

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signed apk: arm64_v8a (SDK: android-2)

Please sign in to comment.