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

Connect ProjectManager & UndoStack from Project ctor

parent 49118d49
......@@ -38,6 +38,9 @@ Project::Project()
m_workflow = new MainWorkflow( m_projectManager );
m_workspace = new Workspace( m_settings );
m_library = new Library( m_workspace, m_projectManager );
QObject::connect( m_undoStack, SIGNAL( cleanChanged( bool ) ), m_projectManager, SLOT( cleanChanged( bool ) ) );
QObject::connect( m_projectManager, SIGNAL( projectSaved() ), m_undoStack, SLOT( setClean() ) );
}
Project::~Project()
......
......@@ -103,7 +103,7 @@ ProjectManager::ProjectManager( Settings* projectSettings, Settings* vlmcSetting
vlmcSettings->watchValue( "vlmc/AutomaticBackup", this,
SLOT( automaticSaveEnabledChanged(QVariant) ),
Qt::QueuedConnection );
projectSettings->createVar( SettingValue::Int, "vlmc/AutomaticBackupInterval", 5,
vlmcSettings->createVar( SettingValue::Int, "vlmc/AutomaticBackupInterval", 5,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save interval" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "This is the interval that VLMC will wait "
"between two automatic save" ), SettingValue::Nothing );
......@@ -111,12 +111,7 @@ ProjectManager::ProjectManager( Settings* projectSettings, Settings* vlmcSetting
SLOT( automaticSaveIntervalChanged(QVariant) ),
Qt::QueuedConnection );
Project::getInstance()->settings()->watchValue( "vlmc/ProjectName", this,
SLOT(projectNameChanged(QVariant) ) );
connect( Project::getInstance()->undoStack(), SIGNAL( cleanChanged( bool ) ),
this, SLOT( cleanChanged( bool ) ) );
connect( this, SIGNAL( projectSaved() ),
Project::getInstance()->undoStack(), SLOT( setClean() ) );
projectSettings->watchValue( "vlmc/ProjectName", this, SLOT(projectNameChanged(QVariant) ) );
//We have to wait for the library to be loaded before loading the workflow
//FIXME
......
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