[qet] qet/qet: [4842] Minor : save file set enabled only when opened a project |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4842
Author: scorpio810
Date: 2017-01-11 01:04:43 +0100 (Wed, 11 Jan 2017)
Log Message:
-----------
Minor : save file set enabled only when opened a project
Modified Paths:
--------------
trunk/sources/qetdiagrameditor.cpp
trunk/sources/qetdiagrameditor.h
Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp 2017-01-10 20:22:34 UTC (rev 4841)
+++ trunk/sources/qetdiagrameditor.cpp 2017-01-11 00:04:43 UTC (rev 4842)
@@ -101,7 +101,7 @@
connect (&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(subWindowActivated(QMdiSubWindow*)));
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();
show();
@@ -1313,6 +1313,7 @@
bool editable_project = (pv && !pv -> project() -> isReadOnly());
close_file -> setEnabled(opened_project);
+ save_file -> setEnabled(opened_project);
save_file_as -> setEnabled(opened_project);
prj_edit_prop -> setEnabled(opened_project);
prj_add_diagram -> setEnabled(editable_project);
@@ -2134,17 +2135,17 @@
m_selection_properties_editor->setDiagram(dv->diagram());
}
-/**
- * @brief QETDiagramEditor::activeUndoStackCleanChanged
- * Enable the QAction save_file when @clean is set to false
- * @clean at true do nothing;
- * @param clean
- */
-void QETDiagramEditor::activeUndoStackCleanChanged(bool clean) {
+///**
+// * @brief QETDiagramEditor::activeUndoStackCleanChanged
+// * Enable the QAction save_file when @clean is set to false
+// * @clean at true do nothing;
+// * @param clean
+// */
+//void QETDiagramEditor::activeUndoStackCleanChanged(bool clean) {
// if (!clean) {
-// save_file -> setEnabled(true);
+// //save_file -> setEnabled(true);
// }
-}
+//}
/**
Modified: trunk/sources/qetdiagrameditor.h
===================================================================
--- trunk/sources/qetdiagrameditor.h 2017-01-10 20:22:34 UTC (rev 4841)
+++ trunk/sources/qetdiagrameditor.h 2017-01-11 00:04:43 UTC (rev 4842)
@@ -156,7 +156,7 @@
private slots:
void selectionChanged();
- void activeUndoStackCleanChanged (bool clean);
+ //void activeUndoStackCleanChanged (bool clean);
// attributes
private: