ensured parenting of qwidgets
This commit is contained in:
+3
-4
@@ -108,10 +108,9 @@ Effect::Effect(Clip* c, const EffectMeta *em) :
|
||||
// set up base UI
|
||||
container = new CollapsibleWidget();
|
||||
connect(container->enabled_check, SIGNAL(clicked(bool)), this, SLOT(field_changed()));
|
||||
ui = new QWidget();
|
||||
ui_layout = new QGridLayout();
|
||||
ui = new QWidget(container);
|
||||
ui_layout = new QGridLayout(ui);
|
||||
ui_layout->setSpacing(4);
|
||||
ui->setLayout(ui_layout);
|
||||
container->setContents(ui);
|
||||
|
||||
connect(container->title_bar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(show_context_menu(const QPoint&)));
|
||||
@@ -314,7 +313,7 @@ Effect::~Effect() {
|
||||
close();
|
||||
}
|
||||
|
||||
//delete container;
|
||||
delete container;
|
||||
|
||||
for (int i=0;i<rows.size();i++) {
|
||||
delete rows.at(i);
|
||||
|
||||
@@ -89,6 +89,8 @@ EffectField::EffectField(EffectRow *parent, int t, const QString &i) :
|
||||
}
|
||||
}
|
||||
|
||||
EffectField::~EffectField() {}
|
||||
|
||||
double EffectField::get_validated_keyframe_handle(int key, bool post) {
|
||||
int comp_key = -1;
|
||||
|
||||
|
||||
@@ -22,11 +22,13 @@ class EffectField : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectField(EffectRow* parent, int t, const QString& i);
|
||||
~EffectField();
|
||||
|
||||
EffectRow* parent_row;
|
||||
int type;
|
||||
QString id;
|
||||
|
||||
double get_validated_keyframe_handle(int key, bool post);
|
||||
double get_validated_keyframe_handle(int key, bool post);
|
||||
|
||||
QVariant get_previous_data();
|
||||
QVariant get_current_data();
|
||||
|
||||
@@ -47,6 +47,12 @@ EffectRow::EffectRow(Effect *parent, bool save, QGridLayout *uilayout, const QSt
|
||||
}
|
||||
}
|
||||
|
||||
EffectRow::~EffectRow() {
|
||||
for (int i=0;i<fields.size();i++) {
|
||||
delete fields.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
bool EffectRow::isKeyframing() {
|
||||
return keyframing;
|
||||
}
|
||||
@@ -162,16 +168,11 @@ EffectField* EffectRow::add_field(int type, const QString& id, int colspan) {
|
||||
}
|
||||
|
||||
void EffectRow::add_widget(QWidget* w) {
|
||||
widgets.append(w);
|
||||
ui->addWidget(w, ui_row, column_count);
|
||||
column_count++;
|
||||
}
|
||||
|
||||
EffectRow::~EffectRow() {
|
||||
for (int i=0;i<fields.size();i++) {
|
||||
delete fields.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
void EffectRow::set_keyframe_now(ComboAction* ca) {
|
||||
long time = sequence->playhead-parent_effect->parent_clip->timeline_in+parent_effect->parent_clip->clip_in;
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ private:
|
||||
QString name;
|
||||
int ui_row;
|
||||
QVector<EffectField*> fields;
|
||||
QVector<QWidget*> widgets;
|
||||
|
||||
KeyframeNavigator* keyframe_nav;
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ Media::~Media() {
|
||||
case MEDIA_TYPE_SEQUENCE: if (object != nullptr) delete to_sequence(); break;
|
||||
}
|
||||
if (throbber != nullptr) delete throbber;
|
||||
qDeleteAll(children);
|
||||
// qDeleteAll(children);
|
||||
}
|
||||
|
||||
Footage *Media::to_footage() {
|
||||
|
||||
Reference in New Issue
Block a user