Commit d120c3e3 authored by Etienne Rebetez's avatar Etienne Rebetez

reverse selection if no gradient is selected.

Thanks to Shalin Shah

BUG: 342020
REVIEW: 121778
parent 9ea0ca94
......@@ -156,9 +156,15 @@ void LegendWidget::legendItemAction(QColor color)
KalziumElementProperty *elementProperty = KalziumElementProperty::instance();
for (int element = 1; element <= 118; ++element) {
if (elementProperty->getBorderColor(element).operator==(color) ||
if(Prefs::colorgradientbox() == KalziumElementProperty::NOGRADIENT){
if (elementProperty->getElementColor(element).operator!=(color)) {
emit elementMatched(element);
}
}else{
if (elementProperty->getBorderColor(element).operator==(color) ||
elementProperty->getElementColor(element).operator==(color)) {
emit elementMatched(element);
emit elementMatched(element);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment