Skip to content
Permalink
Browse files

[ogr] Only throw validity error in reloadData() when previously valid

  • Loading branch information
nirvn committed Apr 18, 2019
1 parent dd18e8f commit 54a06fb8c09aea3c230c415408b92ccbda18304e
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -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() ) );
}

0 comments on commit 54a06fb

Please sign in to comment.
You can’t perform that action at this time.