connected effect UI to enabled setting
This commit is contained in:
+1
-1
@@ -154,7 +154,6 @@ public:
|
||||
int gizmo_count();
|
||||
|
||||
bool IsEnabled();
|
||||
void SetEnabled(bool b);
|
||||
|
||||
virtual void refresh();
|
||||
|
||||
@@ -214,6 +213,7 @@ public:
|
||||
static const EffectMeta* GetInternalMeta(int internal_id, int type);
|
||||
public slots:
|
||||
void FieldChanged();
|
||||
void SetEnabled(bool b);
|
||||
signals:
|
||||
void EnabledChanged(bool);
|
||||
private slots:
|
||||
|
||||
@@ -102,11 +102,12 @@ void DoubleField::UpdateFromWidget(double d)
|
||||
}
|
||||
|
||||
SetValueAt(Now(), d);
|
||||
GetParentRow()->SetKeyframeOnAllFields(nullptr);
|
||||
|
||||
if (!ls->IsDragging() && kdc_ != nullptr) {
|
||||
kdc_->SetNewKeyframes();
|
||||
|
||||
olive::UndoStack.push(kdc_);
|
||||
|
||||
kdc_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ CollapsibleWidget::CollapsibleWidget(QWidget* parent) : QWidget(parent) {
|
||||
header = new QLabel(title_bar);
|
||||
collapse_button = new QPushButton(title_bar);
|
||||
collapse_button->setIconSize(collapse_button->iconSize()*0.5);
|
||||
collapse_button->setStyleSheet("QPushButton { border: none; }");
|
||||
collapse_button->setFlat(true);
|
||||
SetText(tr("<untitled>"));
|
||||
title_bar_layout->addWidget(collapse_button);
|
||||
title_bar_layout->addWidget(enabled_check);
|
||||
@@ -103,7 +103,7 @@ void CollapsibleWidget::SetContents(QWidget* c) {
|
||||
contents = c;
|
||||
if (!existing) {
|
||||
layout->addWidget(contents);
|
||||
connect(enabled_check, SIGNAL(toggled(bool)), this, SLOT(on_enabled_change(bool)));
|
||||
connect(enabled_check, SIGNAL(toggled(bool)), contents, SLOT(setEnabled(bool)));
|
||||
connect(collapse_button, SIGNAL(clicked()), this, SLOT(on_visible_change()));
|
||||
}
|
||||
}
|
||||
@@ -112,10 +112,6 @@ void CollapsibleWidget::SetText(const QString &s) {
|
||||
header->setText(s);
|
||||
}
|
||||
|
||||
void CollapsibleWidget::on_enabled_change(bool b) {
|
||||
contents->setEnabled(b);
|
||||
}
|
||||
|
||||
void CollapsibleWidget::on_visible_change() {
|
||||
contents->setVisible(!contents->isVisible());
|
||||
set_button_icon(contents->isVisible());
|
||||
|
||||
@@ -72,7 +72,6 @@ signals:
|
||||
void visibleChanged();
|
||||
|
||||
private slots:
|
||||
void on_enabled_change(bool b);
|
||||
void on_visible_change();
|
||||
|
||||
public slots:
|
||||
|
||||
+3
-1
@@ -78,7 +78,9 @@ EffectUI::EffectUI(Effect* e) :
|
||||
layout_->addWidget(nav, i, maximum_column);
|
||||
}
|
||||
|
||||
connect(enabled_check, SIGNAL(clicked(bool)), e, SLOT(FieldChanged()));
|
||||
enabled_check->setChecked(e->IsEnabled());
|
||||
connect(enabled_check, SIGNAL(toggled(bool)), e, SLOT(FieldChanged()));
|
||||
connect(enabled_check, SIGNAL(toggled(bool)), e, SLOT(SetEnabled(bool)));
|
||||
}
|
||||
|
||||
Effect *EffectUI::GetEffect()
|
||||
|
||||
Reference in New Issue
Block a user