Skip to content

Commit

Permalink
[ogr] Only throw validity error in reloadData() when previously valid
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Apr 18, 2019
1 parent 32d24dc commit 6724d01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -4432,10 +4432,11 @@ void QgsOgrProvider::close()

void QgsOgrProvider::reloadData()
{
bool wasValid = mValid;
forceReload();
close();
open( OpenModeSameAsCurrent );
if ( !mValid )
if ( !mValid && wasValid )
pushError( tr( "Cannot reopen datasource %1" ).arg( dataSourceUri() ) );
}

Expand Down

0 comments on commit 6724d01

Please sign in to comment.