History

conditionally set a new hostname on preferences save

Stephen Birarda committed 13 years ago

Commit 6b83f951 parent e3d1e5d2 files · +46 −30Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+8−0
@@ -1140,6 +1140,14 @@ void Application::editPreferences() { · 1139 unmodified lines
11401140 return;
11411141 }
11421142
1143+ // check if the domain server hostname is new - if so we need to clear the nodelist and delete the local voxels
1144+ const char* newHostname = domainServerHostname->text().toLocal8Bit().data();
1145+
1146+ if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, sizeof(&newHostname)) != 0) {
1147+ NodeList::getInstance()->clear();
1148+ NodeList::getInstance()->setDomainHostname(newHostname);
1149+ }
1150+
11431151 QUrl url(avatarURL->text());
11441152 _myAvatar.getVoxels()->setVoxelURL(url);
11451153 sendAvatarVoxelURLMessage(url);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t