QTfrontend/ui/page/pagegamestats.cpp
changeset 15488 a7d54832fad6
parent 15299 16f389fcd462
child 15611 c259073a8052
--- a/QTfrontend/ui/page/pagegamestats.cpp	Fri Oct 11 16:33:01 2019 +0200
+++ b/QTfrontend/ui/page/pagegamestats.cpp	Fri Oct 11 16:54:50 2019 +0200
@@ -121,7 +121,7 @@
     btnRestart->setFixedHeight(81);
     btnRestart->setStyleSheet("QPushButton{margin-top:24px}");
     btnSave = addButton(":/res/Save.png", bottomLayout, 2, true);
-    btnSave->setWhatsThis(tr("Save"));
+    saveDemoBtnEnabled(true);
     btnSave->setStyleSheet("QPushButton{margin: 24px 0 0 0;}");
 
     return bottomLayout;
@@ -174,6 +174,10 @@
 void PageGameStats::saveDemoBtnEnabled(bool enabled)
 {
     btnSave->setEnabled(enabled);
+    if (enabled)
+        btnSave->setWhatsThis(tr("Save demo"));
+    else
+        btnSave->setWhatsThis(tr("Save demo (unavailable because the /lua command was used)"));
 }
 
 void PageGameStats::renderStats()