Public perception of Walmart (WMT) and Dick’s Sporting Goods (DKS) improved after both retailers imposed new restrictions on gun sales, in the aftermath of the Feb. 14 high-school shooting in Florida that left 17 dead.

A new survey of consumers by research firm YouGov BrandIndex shows that the “buzz score” for Walmart jumped 7 points after Walmart changed its gun policy on Feb. 27, from 13 to 20. The score for Dick’s surged from 2 to 18. YouGov computes scores by asking survey respondents whether they’ve heard anything about a given brand recently, and whether it was positive or negative. The worst possible score is -100 (totally negative) while the best is 100 (totally positive).

Both stores still sell guns. But each recently changed its policies, taking assault-style weapons off the shelves completely and requiring all buyers to be at least 21. Walmart is the nation’s biggest seller of firearms, while Dick’s is the biggest sporting-goods retailer.

Not surprisingly, impressions of the changes at both retailers varied by political persuasion. Democrats and Independents led the push behind Walmart’s rise in perception, while Republicans’ perception of the retail giant fell slightly. Democrats were also responsible for the boost for Dick’s, while Republicans and Independents stayed the same on the store.

“Buzz” scores jumped for Walmart and Dick’s after they tightened rules for gun purchases on Feb. 28. Source: YouGov BrandIndex More

Consumer-facing companies are grappling in various ways with American gun violence and the controversies over permissive gun laws in many states, and in Washington. Nearly 20 companies have cut ties recently with the National Rifle Association, the nation’s major gun-rights lobbying group. Recent research by YouGov found none of those companies suffered a net decline in public-perception scores. Scores for two airlines, Delta and United, improved slightly. Since those are net perception scores, they can include some consumers who react negatively and others who react positively.

Delta did suffer one setback: the state of Georgia canceled a proposed tax break for the airline worth about $50 million, as retribution for Delta ending a discount program for NRA members. Gov. Nathan Deal is a Republican, and Republicans control the Georgia legislature, where several members said Delta was singling out conservatives for unfair treatment. Delta has since said it plans to end affiliations with all groups that have a political slant.

Confidential tip line: rickjnewman@yahoo.com. Encrypted communication available.

Read more:

Rick Newman is the author of four books, including Rebounders: How Winners Pivot from Setback to Success. Follow him on Twitter: @rickjnewman

Follow Yahoo Finance on Facebook, Twitter, Instagram, and LinkedIn