mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-09 08:49:59 +01:00
Minor : save file set enabled only when opened a project
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4842 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -101,7 +101,7 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
|
|||||||
|
|
||||||
connect (&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(subWindowActivated(QMdiSubWindow*)));
|
connect (&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(subWindowActivated(QMdiSubWindow*)));
|
||||||
connect (QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slot_updatePasteAction()));
|
connect (QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slot_updatePasteAction()));
|
||||||
connect (&undo_group, SIGNAL(cleanChanged(bool)), this, SLOT(activeUndoStackCleanChanged(bool)));
|
//connect (&undo_group, SIGNAL(cleanChanged(bool)), this, SLOT(activeUndoStackCleanChanged(bool)));
|
||||||
|
|
||||||
readSettings();
|
readSettings();
|
||||||
show();
|
show();
|
||||||
@@ -1313,6 +1313,7 @@ void QETDiagramEditor::slot_updateActions()
|
|||||||
bool editable_project = (pv && !pv -> project() -> isReadOnly());
|
bool editable_project = (pv && !pv -> project() -> isReadOnly());
|
||||||
|
|
||||||
close_file -> setEnabled(opened_project);
|
close_file -> setEnabled(opened_project);
|
||||||
|
save_file -> setEnabled(opened_project);
|
||||||
save_file_as -> setEnabled(opened_project);
|
save_file_as -> setEnabled(opened_project);
|
||||||
prj_edit_prop -> setEnabled(opened_project);
|
prj_edit_prop -> setEnabled(opened_project);
|
||||||
prj_add_diagram -> setEnabled(editable_project);
|
prj_add_diagram -> setEnabled(editable_project);
|
||||||
@@ -2134,17 +2135,17 @@ void QETDiagramEditor::selectionChanged()
|
|||||||
m_selection_properties_editor->setDiagram(dv->diagram());
|
m_selection_properties_editor->setDiagram(dv->diagram());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
///**
|
||||||
* @brief QETDiagramEditor::activeUndoStackCleanChanged
|
// * @brief QETDiagramEditor::activeUndoStackCleanChanged
|
||||||
* Enable the QAction save_file when @clean is set to false
|
// * Enable the QAction save_file when @clean is set to false
|
||||||
* @clean at true do nothing;
|
// * @clean at true do nothing;
|
||||||
* @param clean
|
// * @param clean
|
||||||
*/
|
// */
|
||||||
void QETDiagramEditor::activeUndoStackCleanChanged(bool clean) {
|
//void QETDiagramEditor::activeUndoStackCleanChanged(bool clean) {
|
||||||
// if (!clean) {
|
// if (!clean) {
|
||||||
// save_file -> setEnabled(true);
|
// //save_file -> setEnabled(true);
|
||||||
// }
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ class QETDiagramEditor : public QETMainWindow {
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void selectionChanged();
|
void selectionChanged();
|
||||||
void activeUndoStackCleanChanged (bool clean);
|
//void activeUndoStackCleanChanged (bool clean);
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user