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
|
||||
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, QWidget *parent)
|
||||
: BaseMainWindow(std::move(context), parent), timing_driven(false)
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent)
|
||||
: BaseMainWindow(std::move(context), parent), timing_driven(false), chipArgs(args)
|
||||
{
|
||||
initMainResource();
|
||||
|
||||
@ -245,6 +245,7 @@ void MainWindow::new_proj()
|
||||
preload_pcf = "";
|
||||
chipArgs.package = package.toStdString().c_str();
|
||||
ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
||||
actionLoadJSON->setEnabled(true);
|
||||
|
||||
Q_EMIT contextChanged(ctx.get());
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class MainWindow : public BaseMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
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();
|
||||
|
||||
public:
|
||||
|
@ -357,7 +357,7 @@ int main(int argc, char *argv[])
|
||||
#ifndef NO_GUI
|
||||
if (vm.count("gui")) {
|
||||
Application a(argc, argv);
|
||||
MainWindow w(std::move(ctx));
|
||||
MainWindow w(std::move(ctx), chipArgs);
|
||||
if (vm.count("json")) {
|
||||
std::string filename = vm["json"].as<std::string>();
|
||||
std::string pcf = "";
|
||||
|
Loading…
Reference in New Issue
Block a user