From 3338ff1140d7867577622e61d48d207b923753c0 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sat, 23 Jan 2016 19:57:43 +0300 Subject: [PATCH] [qt][editor] Upload changes only if they have not been uploaded yet. --- qt/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index 2308a064cf..6393a70f79 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -384,7 +384,11 @@ void MainWindow::OnUploadEditsMenuItem() if (key.empty() || secret.empty()) OnLoginMenuItem(); else - osm::Editor::Instance().UploadChanges(key, secret, {}); + { + auto & editor = osm::Editor::Instance(); + if (editor.HaveSomethingToUpload()) + editor.UploadChanges(key, secret, {}); + } } void MainWindow::OnBeforeEngineCreation()