From 87faf131575091160e9776c511e24b65e8b6b2e9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Oct 2014 00:12:33 +0300 Subject: Disable char rename button if for selected char not allowed rename. --- src/gui/windows/charselectdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/windows/charselectdialog.cpp') diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 32a3ea410..8d80fe1f7 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -593,6 +593,11 @@ void CharSelectDialog::updateState() { // TRANSLATORS: char select dialog. button. mPlayButton->setCaption(_("Play")); + + LocalPlayer *const player = mCharacterEntries[ + idx]->getCharacter()->dummy; + if (player) + mRenameButton->setEnabled(player->getRename() ? true : false); } else { -- cgit v1.2.3-70-g09d2