Hitting enter no longer shows chat window when chat is disabled.

When chat is disabled (QXMPP library not available or XMPP disconnected)
hitting enter would show the chat window, even when the Tools -> Chat
menu item is grayed out!
This commit is contained in:
James Brotchie 2014-04-01 07:38:22 +10:00
parent d737638d8f
commit da116608a0

View file

@ -1102,6 +1102,11 @@ void Menu::showMetavoxelEditor() {
}
void Menu::showChat() {
if (!_chatAction->isEnabled()) {
// Don't do anything if chat is disabled (No
// QXMPP library or xmpp is disconnected).
return;
}
QMainWindow* mainWindow = Application::getInstance()->getWindow();
if (!_chatWindow) {
mainWindow->addDockWidget(Qt::NoDockWidgetArea, _chatWindow = new ChatWindow());