def get_view_setting(view, sname, default=None):
    """Check if a setting is view-specific and only then return its value.

    Otherwise return `default`.
    """
    s = view.settings()
    value = s.get(sname)
    s.erase(sname)
    value2 = s.get(sname)
    if value2 == value:
        return default
    else:
        s.set(sname, value)
        return value