QTfrontend/team.cpp
changeset 12670 967990d958bc
parent 11046 47a8c19ecb60
child 13080 23a498a2b5b8
--- a/QTfrontend/team.cpp	Sat Oct 07 20:07:21 2017 +0200
+++ b/QTfrontend/team.cpp	Sun Oct 08 04:14:49 2017 +0200
@@ -208,6 +208,14 @@
     return f.exists();
 }
 
+// Returns true if the team name has been changed but a file with the same team name already exists.
+// So if this team would be saved, another team file would be overwritten, which is generally not
+// desired.
+bool HWTeam::wouldOverwriteOtherFile()
+{
+    return (m_name != OldTeamName) && fileExists();
+}
+
 bool HWTeam::deleteFile()
 {
     if(m_isNetTeam)