Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Fixed submenus not displaying correctly on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
ttddee committed Apr 13, 2022
1 parent 9ab7b0a commit 051e6d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/mainmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ MainMenu::MainMenu(MainWindow* mainWindow)
this->addMenu(editMenu);

auto createNodeMenu = editMenu->addMenu("Create Node");
createNodeMenu->setFixedWidth(150);

// TODO: This is doubled in nodegraphcontextmenu

Expand All @@ -84,7 +83,6 @@ MainMenu::MainMenu(MainWindow* mainWindow)
i.next();
auto submenu = createNodeMenu->addMenu(categoryStrings[i.key()]);
categories[i.key()] = submenu;
submenu->setFixedWidth(180);
}
}

Expand Down Expand Up @@ -123,7 +121,6 @@ MainMenu::MainMenu(MainWindow* mainWindow)
{
auto submenu = categories.value(NODE_CATEGORY_ISF)->addMenu(cat);
isfCategories[cat] = submenu;
submenu->setFixedWidth(190);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ MainWindow::MainWindow(QWidget *parent)
QDir::currentPath());

projectManager->createStartupProject();

// Bring window to front, just in case it isn't
this->setWindowState(Qt::WindowActive);
}

NodeGraph* MainWindow::getNodeGraph() const
Expand Down
4 changes: 0 additions & 4 deletions src/nodegraphcontextmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ namespace Cascade {
NodeGraphContextMenu::NodeGraphContextMenu(NodeGraph* parent)
: QMenu(parent)
{
this->setFixedWidth(150);

// TODO: This is doubled in mainmenu

// Populate menu with submenus aka categories
Expand All @@ -42,7 +40,6 @@ NodeGraphContextMenu::NodeGraphContextMenu(NodeGraph* parent)
i.next();
auto submenu = this->addMenu(categoryStrings[i.key()]);
categories[i.key()] = submenu;
submenu->setFixedWidth(180);
}
}

Expand Down Expand Up @@ -79,7 +76,6 @@ NodeGraphContextMenu::NodeGraphContextMenu(NodeGraph* parent)
{
auto submenu = categories.value(NODE_CATEGORY_ISF)->addMenu(cat);
isfCategories[cat] = submenu;
submenu->setFixedWidth(190);
}
}

Expand Down

0 comments on commit 051e6d5

Please sign in to comment.