Changeset View
Changeset View
Standalone View
Standalone View
src/output.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 102 | for (const QString &key : before.keys()) { | |||
---|---|---|---|---|---|
103 | const auto mb = before.value(key); | 103 | const auto mb = before.value(key); | ||
104 | const auto ma = after.value(key); | 104 | const auto ma = after.value(key); | ||
105 | if (mb->id() != ma->id()) { | 105 | if (mb->id() != ma->id()) { | ||
106 | return false; | 106 | return false; | ||
107 | } | 107 | } | ||
108 | if (mb->size() != ma->size()) { | 108 | if (mb->size() != ma->size()) { | ||
109 | return false; | 109 | return false; | ||
110 | } | 110 | } | ||
111 | if (mb->refreshRate() != ma->refreshRate()) { | 111 | if (!qFuzzyCompare(mb->refreshRate(), ma->refreshRate())) { | ||
112 | return false; | 112 | return false; | ||
113 | } | 113 | } | ||
114 | if (mb->name() != ma->name()) { | 114 | if (mb->name() != ma->name()) { | ||
115 | return false; | 115 | return false; | ||
116 | } | 116 | } | ||
117 | } | 117 | } | ||
118 | // They're the same | 118 | // They're the same | ||
119 | return true; | 119 | return true; | ||
▲ Show 20 Lines • Show All 262 Lines • ▼ Show 20 Line(s) | |||||
382 | 382 | | |||
383 | qreal Output::scale() const | 383 | qreal Output::scale() const | ||
384 | { | 384 | { | ||
385 | return d->scale; | 385 | return d->scale; | ||
386 | } | 386 | } | ||
387 | 387 | | |||
388 | void Output::setScale(qreal factor) | 388 | void Output::setScale(qreal factor) | ||
389 | { | 389 | { | ||
390 | if (d->scale == factor) { | 390 | if (qFuzzyCompare(d->scale, factor)) { | ||
391 | return; | 391 | return; | ||
392 | } | 392 | } | ||
393 | d->scale = factor; | 393 | d->scale = factor; | ||
394 | emit scaleChanged(); | 394 | emit scaleChanged(); | ||
395 | } | 395 | } | ||
396 | 396 | | |||
397 | bool Output::isConnected() const | 397 | bool Output::isConnected() const | ||
398 | { | 398 | { | ||
▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Line(s) | 501 | { | |||
522 | if (d->pos != other->d->pos) { | 522 | if (d->pos != other->d->pos) { | ||
523 | changes << &Output::posChanged; | 523 | changes << &Output::posChanged; | ||
524 | setPos(other->pos()); | 524 | setPos(other->pos()); | ||
525 | } | 525 | } | ||
526 | if (d->rotation != other->d->rotation) { | 526 | if (d->rotation != other->d->rotation) { | ||
527 | changes << &Output::rotationChanged; | 527 | changes << &Output::rotationChanged; | ||
528 | setRotation(other->d->rotation); | 528 | setRotation(other->d->rotation); | ||
529 | } | 529 | } | ||
530 | if (d->scale != other->d->scale) { | 530 | if (!qFuzzyCompare(d->scale, other->d->scale)) { | ||
broulik: Missing negation | |||||
531 | changes << &Output::scaleChanged; | 531 | changes << &Output::scaleChanged; | ||
532 | setScale(other->d->scale); | 532 | setScale(other->d->scale); | ||
533 | } | 533 | } | ||
534 | if (d->currentMode != other->d->currentMode) { | 534 | if (d->currentMode != other->d->currentMode) { | ||
535 | changes << &Output::currentModeIdChanged; | 535 | changes << &Output::currentModeIdChanged; | ||
536 | setCurrentModeId(other->d->currentMode); | 536 | setCurrentModeId(other->d->currentMode); | ||
537 | } | 537 | } | ||
538 | if (d->connected != other->d->connected) { | 538 | if (d->connected != other->d->connected) { | ||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |
Missing negation