summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 7e66632b..e2af5fa3 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -1002,10 +1002,16 @@ void LocalPlayer::event(Event::Channel channel, const Event &event)
}
else if (channel == Event::ConfigChannel)
{
- if (event.getType() == Event::ConfigOptionChanged &&
- event.getString("option") == "showownname")
+ if (event.getType() == Event::ConfigOptionChanged)
{
- setShowName(config.showOwnName);
+ if (event.hasValue(&Config::showOwnName))
+ {
+ setShowName(config.showOwnName);
+ }
+ else if (event.hasValue(&Config::visibleNames))
+ {
+ return;
+ }
}
}