aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/basewindow.cc17
-rw-r--r--gui/basewindow.h2
-rw-r--r--gui/ecp5/mainwindow.cc9
-rw-r--r--gui/ice40/mainwindow.cc7
4 files changed, 18 insertions, 17 deletions
diff --git a/gui/basewindow.cc b/gui/basewindow.cc
index 5b03b667..550a4b93 100644
--- a/gui/basewindow.cc
+++ b/gui/basewindow.cc
@@ -310,11 +310,11 @@ void BaseMainWindow::save_json()
{
QString fileName = QFileDialog::getSaveFileName(this, QString("Save JSON"), QString(), QString("*.json"));
if (!fileName.isEmpty()) {
- std::string fn = fileName.toStdString();
+ std::string fn = fileName.toStdString();
std::ofstream f(fn);
if (write_json_file(f, fn, ctx.get()))
log("Saving JSON successful.\n");
- else
+ else
log("Saving JSON failed.\n");
}
}
@@ -335,7 +335,7 @@ void BaseMainWindow::budget_finish(bool status)
{
disableActions();
if (status) {
- log("Assigning timing budget successful.\n");
+ log("Assigning timing budget successful.\n");
updateActions();
} else {
log("Assigning timing budget failed.\n");
@@ -399,7 +399,7 @@ void BaseMainWindow::place() { Q_EMIT task->place(timing_driven); }
void BaseMainWindow::disableActions()
{
- actionLoadJSON->setEnabled(true);
+ actionLoadJSON->setEnabled(true);
actionPack->setEnabled(false);
actionAssignBudget->setEnabled(false);
actionPlace->setEnabled(false);
@@ -416,13 +416,12 @@ void BaseMainWindow::disableActions()
void BaseMainWindow::updateActions()
{
- if (ctx->settings.find(ctx->id("pack"))==ctx->settings.end())
+ if (ctx->settings.find(ctx->id("pack")) == ctx->settings.end())
actionPack->setEnabled(true);
- else if (ctx->settings.find(ctx->id("place"))==ctx->settings.end()) {
+ else if (ctx->settings.find(ctx->id("place")) == ctx->settings.end()) {
actionAssignBudget->setEnabled(true);
- actionPlace->setEnabled(true);
- }
- else if (ctx->settings.find(ctx->id("route"))==ctx->settings.end())
+ actionPlace->setEnabled(true);
+ } else if (ctx->settings.find(ctx->id("route")) == ctx->settings.end())
actionRoute->setEnabled(true);
onUpdateActions();
diff --git a/gui/basewindow.h b/gui/basewindow.h
index 4276c401..305cb6c9 100644
--- a/gui/basewindow.h
+++ b/gui/basewindow.h
@@ -20,9 +20,9 @@
#ifndef BASEMAINWINDOW_H
#define BASEMAINWINDOW_H
+#include "command.h"
#include "nextpnr.h"
#include "worker.h"
-#include "command.h"
#include <QMainWindow>
#include <QMenu>
diff --git a/gui/ecp5/mainwindow.cc b/gui/ecp5/mainwindow.cc
index b06e10e9..880af047 100644
--- a/gui/ecp5/mainwindow.cc
+++ b/gui/ecp5/mainwindow.cc
@@ -164,10 +164,11 @@ void MainWindow::onDisableActions()
actionSaveConfig->setEnabled(false);
}
-void MainWindow::onUpdateActions() {
- if (ctx->settings.find(ctx->id("pack"))==ctx->settings.end())
- actionLoadLPF->setEnabled(true);
- if (ctx->settings.find(ctx->id("route"))!=ctx->settings.end())
+void MainWindow::onUpdateActions()
+{
+ if (ctx->settings.find(ctx->id("pack")) == ctx->settings.end())
+ actionLoadLPF->setEnabled(true);
+ if (ctx->settings.find(ctx->id("route")) != ctx->settings.end())
actionSaveConfig->setEnabled(true);
}
diff --git a/gui/ice40/mainwindow.cc b/gui/ice40/mainwindow.cc
index c2ac264f..ccff2117 100644
--- a/gui/ice40/mainwindow.cc
+++ b/gui/ice40/mainwindow.cc
@@ -186,10 +186,11 @@ void MainWindow::onDisableActions()
actionSaveAsc->setEnabled(false);
}
-void MainWindow::onUpdateActions() {
- if (ctx->settings.find(ctx->id("pack"))==ctx->settings.end())
+void MainWindow::onUpdateActions()
+{
+ if (ctx->settings.find(ctx->id("pack")) == ctx->settings.end())
actionLoadPCF->setEnabled(true);
- if (ctx->settings.find(ctx->id("route"))!=ctx->settings.end())
+ if (ctx->settings.find(ctx->id("route")) != ctx->settings.end())
actionSaveAsc->setEnabled(true);
}