Skip to content

Commit

Permalink
fixed bug: opening/creating a gate library was possible with opened n…
Browse files Browse the repository at this point in the history
…etlist
  • Loading branch information
neoneela committed Oct 27, 2024
1 parent 1b587e0 commit d0e3fdd
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions plugins/gui/src/main_window/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,29 +720,31 @@ namespace hal

void MainWindow::handleActionGatelibraryManager()
{
QMessageBox optBox;
QPushButton* newBtn = optBox.addButton("New", QMessageBox::AcceptRole);
newBtn->setToolTip("Create new gate library");
QPushButton* openBtn = optBox.addButton(QMessageBox::Open);
openBtn->setToolTip("Open existing gate library");
QPushButton* cancelBtn = optBox.addButton(QMessageBox::Cancel);
optBox.setWindowTitle("Please select …");
cancelBtn->setToolTip("Cancel");
if(!gNetlist)
{
QMessageBox optBox;
QPushButton* newBtn = optBox.addButton("New", QMessageBox::AcceptRole);
newBtn->setToolTip("Create new gate library");
QPushButton* openBtn = optBox.addButton(QMessageBox::Open);
openBtn->setToolTip("Open existing gate library");
QPushButton* cancelBtn = optBox.addButton(QMessageBox::Cancel);
optBox.setWindowTitle("Please select …");
cancelBtn->setToolTip("Cancel");

optBox.setText("Gate Library Manager");
optBox.setText("Gate Library Manager");

auto btn = optBox.exec();
auto btn = optBox.exec();

if(optBox.clickedButton() == newBtn)
{
mGateLibraryManager->handleCreateAction();
mStackedWidget->setCurrentWidget(mGateLibraryManager);
mFileActions->setup(mGateLibraryManager);
return;
if(optBox.clickedButton() == newBtn)
{
mGateLibraryManager->handleCreateAction();
mStackedWidget->setCurrentWidget(mGateLibraryManager);
mFileActions->setup(mGateLibraryManager);
return;
}
else if (optBox.clickedButton() == cancelBtn)
return;
}
else if (optBox.clickedButton() == cancelBtn)
return;
else
if(gFileStatusManager->isGatelibModified())
{
if(!mGateLibraryManager->callUnsavedChangesWindow()) return;
Expand Down

0 comments on commit d0e3fdd

Please sign in to comment.