MCPcopy Create free account
hub / github.com/KDE/labplot / updateValid

Method updateValid

src/backend/worksheet/InfoElement.cpp:876–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874}
875
876void InfoElement::updateValid() {
877 Q_D(InfoElement);
878 bool valid = false;
879 for (const auto& mp : markerpoints) {
880 if (mp.curve && mp.curve->xColumn() && mp.curve->yColumn())
881 valid = true; // at least one valid curve
882 }
883
884 d->valid = valid;
885
886 Lock lock(m_suppressVisibleChange);
887 m_title->setUndoAware(false);
888 m_title->setVisible(valid);
889 m_title->setUndoAware(true);
890
891 if (valid) {
892 for (auto& mp : markerpoints) {
893 if (mp.curve && mp.curve->xColumn() && mp.curve->yColumn()) {
894 mp.customPoint->setUndoAware(false);
895 mp.customPoint->setVisible(mp.visible);
896 mp.customPoint->setUndoAware(true);
897 }
898 }
899 } else {
900 for (auto& mp : markerpoints) {
901 mp.customPoint->setUndoAware(false);
902 mp.customPoint->setVisible(false);
903 mp.customPoint->setUndoAware(true);
904 }
905 }
906}
907
908// ##############################################################################
909// ###### SLOTs for changes triggered via QActions in the context menu ########

Callers 1

retransformMethod · 0.80

Calls 2

setUndoAwareMethod · 0.80
setVisibleMethod · 0.45

Tested by

no test coverage detected