Always assign colors when assigning palettes.
This commit is contained in:
parent
5b521d63a4
commit
246b947fa7
2 changed files with 2 additions and 1 deletions
|
|
@ -870,6 +870,7 @@ QImage GenerateLinearGradient(
|
||||||
stops.append({ point, color });
|
stops.append({ point, color });
|
||||||
point += step;
|
point += step;
|
||||||
}
|
}
|
||||||
|
gradient.setStops(std::move(stops));
|
||||||
}
|
}
|
||||||
p.fillRect(QRect(QPoint(), size), QBrush(std::move(gradient)));
|
p.fillRect(QRect(QPoint(), size), QBrush(std::move(gradient)));
|
||||||
p.end();
|
p.end();
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ void palette::finalize() {
|
||||||
palette &palette::operator=(const palette &other) {
|
palette &palette::operator=(const palette &other) {
|
||||||
auto wasReady = _ready;
|
auto wasReady = _ready;
|
||||||
for (int i = 0; i != kCount; ++i) {
|
for (int i = 0; i != kCount; ++i) {
|
||||||
if (other._status[i] == Status::Loaded) {
|
if (other._status[i] != Status::Initial) {
|
||||||
if (_status[i] == Status::Initial) {
|
if (_status[i] == Status::Initial) {
|
||||||
new (data(i)) internal::ColorData(*other.data(i));
|
new (data(i)) internal::ColorData(*other.data(i));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue