From add9c8bed73516093b6eb37d4fdf30c592a7f72c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 4 Oct 2018 19:28:45 +0200 Subject: Disable save menu entry until filename has been assigned to the project with save-as. --- src/mainwindow.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cc') 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 += "*"; -- cgit v1.2.3