Commit a170f1bd authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MainWindow: Connect the UndoView & UndoStack when a project is loaded

parent 9720e9a9
......@@ -413,8 +413,7 @@ MainWindow::setupUndoRedoWidget()
QT_TRANSLATE_NOOP( "DockWidgetManager", "History" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures );
QWidget *undoRedoWidget = new QUndoView( Project::getInstance()->undoStack(), dockedWidget );
QUndoView *undoRedoWidget = new QUndoView( dockedWidget );
DockWidgetManager::getInstance()->addDockedWidget( dockedWidget, undoRedoWidget, Qt::TopDockWidgetArea );
}
......@@ -843,6 +842,7 @@ MainWindow::onProjectLoading(Project* project)
connect( project->undoStack(), SIGNAL( canRedoChanged( bool ) ), this, SLOT( canRedoChanged( bool ) ) );
canUndoChanged( project->undoStack()->canUndo() );
canRedoChanged( project->undoStack()->canRedo() );
m_undoView->setStack( project->undoStack() );
const ClipRenderer* clipRenderer = qobject_cast<const ClipRenderer*>( m_clipPreview->getGenericRenderer() );
connect( project->library(), SIGNAL( clipRemoved( const QUuid& ) ), clipRenderer, SLOT( clipUnloaded( const QUuid& ) ) );
......
......@@ -23,6 +23,8 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
class QUndoView;
#include <QApplication>
#include <QSlider>
#include <QToolButton>
......@@ -135,7 +137,8 @@ private:
ProjectWizard* m_wizard;
ImportController* m_importController;
MediaLibrary *m_mediaLibrary;
EffectsListView *m_effectsList;
EffectsListView* m_effectsList;
QUndoView* m_undoView;
private slots:
void on_actionFullscreen_triggered( bool checked );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment