diff --git a/src/headers/utility.hpp b/src/headers/utility.hpp index 4d5d7537..72719f69 100644 --- a/src/headers/utility.hpp +++ b/src/headers/utility.hpp @@ -45,6 +45,7 @@ void placeWidgets(std::string text, QBoxLayout *layout, bool addStretch = true); void deleteLayoutItem(QLayoutItem *item); void clearLayout(QLayout *layout, int afterIdx = 0); +void setLayoutVisible(QLayout *layout, bool visible); QMetaObject::Connection PulseWidget(QWidget *widget, QColor startColor, QColor = QColor(0, 0, 0, 0), QString specifier = "QLabel ", diff --git a/src/macro-condition-video.cpp b/src/macro-condition-video.cpp index d885e48e..1b41f984 100644 --- a/src/macro-condition-video.cpp +++ b/src/macro-condition-video.cpp @@ -947,16 +947,6 @@ bool patternControlIsOptional(VideoCondition cond) cond == VideoCondition::HAS_NOT_CHANGED; } -void setLayoutVisible(QLayout *layout, bool visible) -{ - for (int i = 0; i < layout->count(); ++i) { - QWidget *widget = layout->itemAt(i)->widget(); - if (widget != NULL) { - widget->setVisible(visible); - } - } -} - void MacroConditionVideoEdit::SetWidgetVisibility() { _imagePath->setVisible(requiresFileInput(_entryData->_condition)); diff --git a/src/utility.cpp b/src/utility.cpp index e2d2e3a9..d81bc074 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -229,6 +229,16 @@ void clearLayout(QLayout *layout, int afterIdx) } } +void setLayoutVisible(QLayout *layout, bool visible) +{ + for (int i = 0; i < layout->count(); ++i) { + QWidget *widget = layout->itemAt(i)->widget(); + if (widget != NULL) { + widget->setVisible(visible); + } + } +} + bool compareIgnoringLineEnding(QString &s1, QString &s2) { // Let QT deal with different types of lineendings