diff --git a/sources/projectview.cpp b/sources/projectview.cpp index 521fd1743..688220975 100644 --- a/sources/projectview.cpp +++ b/sources/projectview.cpp @@ -585,14 +585,6 @@ QETResult ProjectView::saveAs(ProjectSaveOptions options) { return(doSave(options)); } -/** - Save the current diagram. - @return A QETResult object reflecting the situation. -*/ -QETResult ProjectView::saveCurrentDiagram() { - return(doSave(CurrentDiagram)); -} - /** Save project content according to \a options, then write the project file. May call saveAs if no filepath was provided before. diff --git a/sources/projectview.h b/sources/projectview.h index 388a09868..32855a28b 100644 --- a/sources/projectview.h +++ b/sources/projectview.h @@ -78,7 +78,6 @@ class ProjectView : public QWidget { void exportProject(); QETResult save(); QETResult saveAs(ProjectSaveOptions = ProjectSaveOptions(AllDiagrams | ModifiedDiagramsOnly)); - QETResult saveCurrentDiagram(); QETResult doSave(ProjectSaveOptions); void saveDiagrams(const QList &); int cleanProject(); diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 3ecdd5a6c..eb709c54a 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -228,7 +228,6 @@ void QETDiagramEditor::actions() { QAction *open_file = m_file_actions_group.addAction( QET::Icons::DocumentOpen, tr("&Ouvrir") ); save_file = m_file_actions_group.addAction( QET::Icons::DocumentSave, tr("&Enregistrer") ); save_file_as = m_file_actions_group.addAction( QET::Icons::DocumentSaveAs, tr("Enregistrer sous") ); - save_cur_diagram = m_file_actions_group.addAction( QET::Icons::DocumentSaveAll, tr("&Enregistrer le sch\351ma courant") ); close_file = m_file_actions_group.addAction( QET::Icons::DocumentClose, tr("&Fermer") ); new_file -> setShortcut( QKeySequence::New ); @@ -241,11 +240,9 @@ void QETDiagramEditor::actions() { close_file -> setStatusTip( tr("Ferme le sch\351ma courant", "status bar tip") ); save_file -> setStatusTip( tr("Enregistre le projet courant et tous ses sch\351mas", "status bar tip") ); save_file_as -> setStatusTip( tr("Enregistre le project courant avec un autre nom de fichier", "status bar tip") ); - save_cur_diagram -> setStatusTip( tr("Enregistre le sch\351ma courant du projet courant", "status bar tip") ); connect(save_file_as, SIGNAL( triggered() ), this, SLOT( saveAs() ) ); connect(save_file, SIGNAL( triggered() ), this, SLOT( save() ) ); - connect(save_cur_diagram, SIGNAL( triggered() ), this, SLOT( saveCurrentDiagram() ) ); connect(new_file, SIGNAL( triggered() ), this, SLOT( newProject() ) ); connect(open_file, SIGNAL( triggered() ), this, SLOT( openProject() ) ); connect(close_file, SIGNAL( triggered() ), this, SLOT( closeCurrentProject() ) ); @@ -634,21 +631,6 @@ void QETDiagramEditor::saveAs() { } } -/** - Methode enregistrant tous les schemas. - @return true si l'enregistrement a reussi, false sinon -*/ -void QETDiagramEditor::saveCurrentDiagram() { - if (ProjectView *project_view = currentProject()) { - QETResult save_file = project_view -> saveCurrentDiagram(); - if (save_file.isOk()) { - QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath()); - } else { - showError(save_file); - } - } -} - /** * @brief QETDiagramEditor::newProject * Create an empty project @@ -1147,7 +1129,6 @@ void QETDiagramEditor::slot_updateActions() { close_file -> setEnabled(opened_project); save_file -> setEnabled(editable_project); save_file_as -> setEnabled(opened_project); - save_cur_diagram -> setEnabled(editable_diagram); prj_edit_prop -> setEnabled(opened_project); prj_add_diagram -> setEnabled(editable_project); //prj_add_diagram_foliolist -> setEnabled(editable_project); diff --git a/sources/qetdiagrameditor.h b/sources/qetdiagrameditor.h index 0497f45ac..0345c3ec5 100644 --- a/sources/qetdiagrameditor.h +++ b/sources/qetdiagrameditor.h @@ -91,7 +91,6 @@ class QETDiagramEditor : public QETMainWindow { void exportDialog(); void save(); void saveAs(); - void saveCurrentDiagram(); bool newProject(); bool openProject(); bool openRecentFile(const QString &); @@ -220,7 +219,6 @@ class QETDiagramEditor : public QETMainWindow { QAction *close_file; ///< Close current project file QAction *save_file; ///< Save current project QAction *save_file_as; ///< Save current project as a specific file - QAction *save_cur_diagram; ///< Save current diagram of the current project only private: QMdiArea workspace;