From da116608a036ca8bb5792a8537a18552d744c860 Mon Sep 17 00:00:00 2001 From: James Brotchie Date: Tue, 1 Apr 2014 07:38:22 +1000 Subject: [PATCH] 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! --- interface/src/Menu.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 7748c466c7..ec20401fef 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -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());