switched global to unique ptr and renamed olive namespace
This commit is contained in:
+10
-10
@@ -100,7 +100,7 @@ void EffectControls::set_zoom(bool in) {
|
||||
void EffectControls::menu_select(QAction* q) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
if ((c->track < 0) == (effect_menu_subtype == EFFECT_TYPE_VIDEO)) {
|
||||
const EffectMeta* meta = reinterpret_cast<const EffectMeta*>(q->data().value<quintptr>());
|
||||
if (effect_menu_type == EFFECT_TYPE_TRANSITION) {
|
||||
@@ -115,7 +115,7 @@ void EffectControls::menu_select(QAction* q) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Olive::UndoStack.push(ca);
|
||||
olive::UndoStack.push(ca);
|
||||
if (effect_menu_type == EFFECT_TYPE_TRANSITION) {
|
||||
update_ui(true);
|
||||
} else {
|
||||
@@ -140,7 +140,7 @@ void EffectControls::copy(bool del) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
EffectDeleteCommand* del_com = (del) ? new EffectDeleteCommand() : nullptr;
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
Effect* effect = c->effects.at(j);
|
||||
if (effect->container->selected) {
|
||||
@@ -166,7 +166,7 @@ void EffectControls::copy(bool del) {
|
||||
delete del_com;
|
||||
}
|
||||
}
|
||||
Olive::UndoStack.push(ca);
|
||||
olive::UndoStack.push(ca);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ void EffectControls::clear_effects(bool clear_cache) {
|
||||
|
||||
void EffectControls::deselect_all_effects(QWidget* sender) {
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
if (c->effects.at(j)->container != sender) {
|
||||
c->effects.at(j)->container->header_click(false, false);
|
||||
@@ -505,7 +505,7 @@ void EffectControls::load_effects() {
|
||||
if (!multiple) {
|
||||
// load in new clips
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
QVBoxLayout* layout;
|
||||
if (c->track < 0) {
|
||||
vcontainer->setVisible(true);
|
||||
@@ -525,7 +525,7 @@ void EffectControls::load_effects() {
|
||||
}
|
||||
}
|
||||
if (selected_clips.size() > 0) {
|
||||
setWindowTitle(panel_name + Olive::ActiveSequence->clips.at(selected_clips.at(0))->name);
|
||||
setWindowTitle(panel_name + olive::ActiveSequence->clips.at(selected_clips.at(0))->name);
|
||||
keyframeView->setEnabled(true);
|
||||
headers->setVisible(true);
|
||||
|
||||
@@ -539,7 +539,7 @@ void EffectControls::delete_effects() {
|
||||
if (mode == TA_NO_TRANSITION) {
|
||||
EffectDeleteCommand* command = new EffectDeleteCommand();
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
Effect* effect = c->effects.at(j);
|
||||
if (effect->container->selected) {
|
||||
@@ -549,7 +549,7 @@ void EffectControls::delete_effects() {
|
||||
}
|
||||
}
|
||||
if (command->clips.size() > 0) {
|
||||
Olive::UndoStack.push(command);
|
||||
olive::UndoStack.push(command);
|
||||
panel_sequence_viewer->viewer_widget->frame_update();
|
||||
} else {
|
||||
delete command;
|
||||
@@ -595,7 +595,7 @@ void EffectControls::resizeEvent(QResizeEvent*) {
|
||||
bool EffectControls::is_focused() {
|
||||
if (this->hasFocus()) return true;
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = Olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
if (c != nullptr) {
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
if (c->effects.at(j)->container->is_focused()) {
|
||||
|
||||
Reference in New Issue
Block a user