summaryrefslogtreecommitdiff
path: root/src/mainwindow.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-10-04 19:28:45 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-10-04 19:28:45 +0200
commitadd9c8bed73516093b6eb37d4fdf30c592a7f72c (patch)
tree71e37ddd8246874d565ec84b2be2dbe6afe8e3d7 /src/mainwindow.cc
parent9a9193d3a2aa3e95efcb36b4903204095e921031 (diff)
Disable save menu entry until filename has been assigned to the project with save-as.
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r--src/mainwindow.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 9f5aa39..0ed2f38 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -73,7 +73,7 @@ MainWindow::MainWindow(Settings& settings)
fileMenu->addAction(act_load_project);
connect(act_load_project, SIGNAL(triggered()), this, SLOT(loadProject()));
- QAction* act_save_project = new QAction(tr("&Save Project"), this);
+ act_save_project = new QAction(tr("&Save Project"), this);
fileMenu->addAction(act_save_project);
connect(act_save_project, SIGNAL(triggered()), this, SLOT(saveProject()));
@@ -342,6 +342,8 @@ void MainWindow::updateWindowTitle()
project_string += " (" + QFileInfo(project.getProjectFile()).fileName() + ")";
}
+ act_save_project->setEnabled(project.getProjectFile() != "");
+
if(project_dirty)
{
project_string += "*";