Fixed initial title and actions after new
This commit is contained in:
parent
0f0259fd94
commit
b5498c8a53
@ -34,8 +34,8 @@ static void initMainResource() { Q_INIT_RESOURCE(nextpnr); }
|
|||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
MainWindow::MainWindow(std::unique_ptr<Context> context, QWidget *parent)
|
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent)
|
||||||
: BaseMainWindow(std::move(context), parent), timing_driven(false)
|
: BaseMainWindow(std::move(context), parent), timing_driven(false), chipArgs(args)
|
||||||
{
|
{
|
||||||
initMainResource();
|
initMainResource();
|
||||||
|
|
||||||
@ -245,6 +245,7 @@ void MainWindow::new_proj()
|
|||||||
preload_pcf = "";
|
preload_pcf = "";
|
||||||
chipArgs.package = package.toStdString().c_str();
|
chipArgs.package = package.toStdString().c_str();
|
||||||
ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
||||||
|
actionLoadJSON->setEnabled(true);
|
||||||
|
|
||||||
Q_EMIT contextChanged(ctx.get());
|
Q_EMIT contextChanged(ctx.get());
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class MainWindow : public BaseMainWindow
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(std::unique_ptr<Context> context, QWidget *parent = 0);
|
explicit MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent = 0);
|
||||||
virtual ~MainWindow();
|
virtual ~MainWindow();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -357,7 +357,7 @@ int main(int argc, char *argv[])
|
|||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
if (vm.count("gui")) {
|
if (vm.count("gui")) {
|
||||||
Application a(argc, argv);
|
Application a(argc, argv);
|
||||||
MainWindow w(std::move(ctx));
|
MainWindow w(std::move(ctx), chipArgs);
|
||||||
if (vm.count("json")) {
|
if (vm.count("json")) {
|
||||||
std::string filename = vm["json"].as<std::string>();
|
std::string filename = vm["json"].as<std::string>();
|
||||||
std::string pcf = "";
|
std::string pcf = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user