Merge pull request #4330 from huffman/edit-off-on-domain-change

Turn editEntities off on domain change
This commit is contained in:
Brad Hefta-Gaub 2015-02-24 20:11:39 -08:00
commit 8c26be49d7
3 changed files with 8 additions and 0 deletions

View file

@ -396,6 +396,10 @@ var toolBar = (function () {
return handled; return handled;
} }
Window.domainChanged.connect(function() {
that.setActive(false);
});
that.cleanup = function () { that.cleanup = function () {
toolBar.cleanup(); toolBar.cleanup();
}; };

View file

@ -18,6 +18,7 @@
#include <QScrollArea> #include <QScrollArea>
#include "Application.h" #include "Application.h"
#include "DomainHandler.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "Menu.h" #include "Menu.h"
#include "ui/ModelsBrowser.h" #include "ui/ModelsBrowser.h"
@ -34,6 +35,8 @@ WindowScriptingInterface::WindowScriptingInterface() :
_nonBlockingFormActive(false), _nonBlockingFormActive(false),
_formResult(QDialog::Rejected) _formResult(QDialog::Rejected)
{ {
const DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
connect(&domainHandler, &DomainHandler::hostnameChanged, this, &WindowScriptingInterface::domainChanged);
} }
WebWindowClass* WindowScriptingInterface::doCreateWebWindow(const QString& title, const QString& url, int width, int height) { WebWindowClass* WindowScriptingInterface::doCreateWebWindow(const QString& title, const QString& url, int width, int height) {

View file

@ -57,6 +57,7 @@ public slots:
QScriptValue peekNonBlockingFormResult(QScriptValue array); QScriptValue peekNonBlockingFormResult(QScriptValue array);
signals: signals:
void domainChanged(const QString& domainHostname);
void inlineButtonClicked(const QString& name); void inlineButtonClicked(const QString& name);
void nonBlockingFormClosed(); void nonBlockingFormClosed();