Projects are now displayed with a [Modified] tag after their properties were edited.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@1901 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-07-07 19:45:32 +00:00
parent b84f713d33
commit e0d23abd91
4 changed files with 98 additions and 14 deletions

View File

@@ -106,6 +106,7 @@ void ProjectView::setProject(QETProject *project) {
if (!project_) {
project_ = project;
connect(project_, SIGNAL(projectTitleChanged(QETProject *, const QString &)), this, SLOT(updateWindowTitle()));
connect(project_, SIGNAL(projectModified (QETProject *, bool)), this, SLOT(updateWindowTitle()));
connect(project_, SIGNAL(readOnlyChanged (QETProject *, bool)), this, SLOT(adjustReadOnlyState()));
adjustReadOnlyState();
loadDiagrams();
@@ -562,6 +563,7 @@ void ProjectView::exportProject() {
@return true si l'enregistrement a reussi, false sinon
*/
bool ProjectView::save() {
bool result = false;
if (project_) {
if (project_ -> filePath().isEmpty()) {
// le projet n'est pas encore enregistre dans un fichier
@@ -572,16 +574,15 @@ bool ProjectView::save() {
if (DiagramView *current_view = currentDiagram()) {
if (Diagram *diagram = current_view -> diagram()) {
diagram -> write();
updateWindowTitle();
return(true);
result = true;
}
} else {
// s'il n'y a pas de schema, on appelle directement la methode write()
project_ -> write();
result = project_ -> write();
}
return(true);
}
return(false);
updateWindowTitle();
return(result);
}
/**