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 d673c6f commit 20161c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -4281,10 +4281,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 20161c5

Please sign in to comment.