diff --git a/domain-server/resources/web/js/settings.js b/domain-server/resources/web/js/settings.js index 141bd72a26..1e9051d717 100644 --- a/domain-server/resources/web/js/settings.js +++ b/domain-server/resources/web/js/settings.js @@ -364,7 +364,7 @@ function makeTableInputs(setting) { _.each(setting.columns, function(col) { html += "\ \ + value='" + (col.default ? col.default : "") + "' data-default='" + (col.default ? col.default : "") + "'>\ " }) @@ -504,7 +504,7 @@ function addTableRow(add_glyphicon) { }) input_clone.find('input').each(function(){ - $(this).val('') + $(this).val($(this).attr('data-default')); }); if (isArray) { @@ -525,9 +525,9 @@ function deleteTableRow(delete_glyphicon) { var table = $(row).closest('table') var isArray = table.data('setting-type') === 'array' + row.empty(); + if (!isArray) { - // this is a hash row, so we empty it but leave the hidden input blank so it is cleared when we save - row.empty() row.html(""); } else { @@ -538,7 +538,6 @@ function deleteTableRow(delete_glyphicon) { row.remove() } else { // this is the last row, we can't remove it completely since we need to post an empty array - row.empty() row.removeClass(Settings.DATA_ROW_CLASS).removeClass(Settings.NEW_ROW_CLASS) row.addClass('empty-array-row') @@ -592,7 +591,7 @@ function updateDataChangedForSiblingRows(row, forceTrue) { var initialPanelSettingJSON = Settings.initialValues[panelParentID][tableShortName] // if they are equal, we don't need data-changed - isTrue = _.isEqual(panelSettingJSON, initialPanelSettingJSON) + isTrue = !_.isEqual(panelSettingJSON, initialPanelSettingJSON) } else { isTrue = true } diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 91335d4932..f2c7afe771 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -720,6 +720,8 @@ void Menu::saveSettings(QSettings* settings) { scanMenuBar(&saveAction, settings); Application::getInstance()->getAvatar()->saveData(settings); + + DependencyManager::get()->storeCurrentAddress(); if (lockedSettings) { Application::getInstance()->unlockSettings(); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 370fd0e07d..dee070740f 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -58,6 +58,8 @@ public slots: void goToUser(const QString& username); void goToAddressFromObject(const QVariantMap& addressMap); + void storeCurrentAddress(); + signals: void lookupResultsFinished(); void lookupResultIsOffline(); @@ -72,7 +74,6 @@ protected: private slots: void handleAPIResponse(QNetworkReply& requestReply); void handleAPIError(QNetworkReply& errorReply); - void storeCurrentAddress(); private: void setDomainInfo(const QString& hostname, quint16 port, const QString& domainName = QString());