Skip to content

Commit

Permalink
Never silently overwrite gcp point files without prompting user
Browse files Browse the repository at this point in the history
(cherry picked from commit d76fe79)
  • Loading branch information
nyalldawson committed Feb 14, 2022
1 parent b71596e commit 31c7c62
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
18 changes: 1 addition & 17 deletions src/app/georeferencer/qgsgeorefmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ void QgsGeoreferencerMainWindow::closeEvent( QCloseEvent *e )
mRasterFileName.clear();
e->accept();
return;
case QgsGeoreferencerMainWindow::GCPSILENTSAVE:
if ( !mGCPpointsFileName.isEmpty() )
saveGCPs();
clearGCPData();
removeOldLayer();
mRasterFileName.clear();
return;
case QgsGeoreferencerMainWindow::GCPDISCARD:
writeSettings();
clearGCPData();
Expand Down Expand Up @@ -213,10 +206,6 @@ void QgsGeoreferencerMainWindow::openRaster( const QString &fileName )
case QgsGeoreferencerMainWindow::GCPSAVE:
saveGCPsDialog();
break;
case QgsGeoreferencerMainWindow::GCPSILENTSAVE:
if ( !mGCPpointsFileName.isEmpty() )
saveGCPs();
break;
case QgsGeoreferencerMainWindow::GCPDISCARD:
break;
case QgsGeoreferencerMainWindow::GCPCANCEL:
Expand Down Expand Up @@ -1274,13 +1263,8 @@ QgsGeoreferencerMainWindow::SaveGCPs QgsGeoreferencerMainWindow::checkNeedGCPSav
{
return QgsGeoreferencerMainWindow::GCPCANCEL;
}
else if ( a == QMessageBox::Discard )
{
return QgsGeoreferencerMainWindow::GCPDISCARD;
}
}

return QgsGeoreferencerMainWindow::GCPSILENTSAVE;
return QgsGeoreferencerMainWindow::GCPDISCARD;
}

// Georeference
Expand Down
1 change: 0 additions & 1 deletion src/app/georeferencer/qgsgeorefmainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ class QgsGeoreferencerMainWindow : public QMainWindow, private Ui::QgsGeorefPlug
enum SaveGCPs
{
GCPSAVE,
GCPSILENTSAVE,
GCPDISCARD,
GCPCANCEL
};
Expand Down

0 comments on commit 31c7c62

Please sign in to comment.