Commit f51def98 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Saving the project set it at a clean state.

parent 2e05ad34
......@@ -31,6 +31,8 @@ UndoStack::UndoStack( QWidget* parent ) : QUndoView( parent )
setStack( m_undoStack );
connect( m_undoStack, SIGNAL( cleanChanged( bool ) ),
ProjectManager::getInstance(), SLOT( cleanChanged( bool ) ) );
connect( ProjectManager::getInstance(), SIGNAL( projectSaved() ),
m_undoStack, SLOT( setClean() ) );
m_undoShortcut = new QShortcut( QKeySequence( tr( "Ctrl+z", "Undo" ) ), this );
m_redoShortcut = new QShortcut( QKeySequence( tr( "Ctrl+Shift+z", "Redo" ) ), this );
......
......@@ -181,6 +181,9 @@
<property name="text">
<string>Save</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionImport">
<property name="text">
......
......@@ -127,4 +127,5 @@ void ProjectManager::saveProject()
m_projectFile->open( QFile::WriteOnly );
m_projectFile->write( doc.toString().toAscii() );
m_projectFile->close();
emit projectSaved();
}
......@@ -58,6 +58,7 @@ private slots:
signals:
void projectChanged( const QString& projectName, bool savedState );
void projectSaved();
};
#endif // PROJECTMANAGER_H
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