diff --git a/ui/zenoedit/main.cpp b/ui/zenoedit/main.cpp index f320a56600..7b647f4f99 100644 --- a/ui/zenoedit/main.cpp +++ b/ui/zenoedit/main.cpp @@ -137,7 +137,6 @@ int main(int argc, char *argv[]) } } -#ifndef ZENO_HIDE_UI ZenoMainWindow mainWindow; zeno::getSession().eventCallbacks->triggerEvent("editorConstructed"); mainWindow.showMaximized(); @@ -158,6 +157,6 @@ int main(int argc, char *argv[]) if (!zsgPath.isEmpty()) mainWindow.openFileAndUpdateParam(zsgPath, paramsJson); } -#endif + return a.exec(); } diff --git a/ui/zenoedit/nodesys/zenonode.cpp b/ui/zenoedit/nodesys/zenonode.cpp index 8ac208fc5a..656bba94fe 100644 --- a/ui/zenoedit/nodesys/zenonode.cpp +++ b/ui/zenoedit/nodesys/zenonode.cpp @@ -1641,10 +1641,14 @@ void ZenoNode::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) else { NODE_CATES cates = pGraphsModel->getCates(); +#ifdef ZENO_HIDE_UI + +#else ZenoNewnodeMenu *menu = new ZenoNewnodeMenu(m_subGpIndex, cates, event->scenePos()); menu->setEditorFocus(); menu->exec(event->screenPos()); menu->deleteLater(); +#endif } } diff --git a/ui/zenoedit/uilogic/scenemenu.cpp b/ui/zenoedit/uilogic/scenemenu.cpp index 031e9426f3..9967b103cd 100644 --- a/ui/zenoedit/uilogic/scenemenu.cpp +++ b/ui/zenoedit/uilogic/scenemenu.cpp @@ -589,11 +589,15 @@ bool sceneMenuEvent( } NODE_CATES cates = zenoApp->graphsManagment()->currentModel()->getCates(); +#ifdef ZENO_HIDE_UI + return false; +#else auto m_menu = new ZenoNewnodeMenu(subgIdx, cates, scenePos); m_menu->setEditorFocus(); m_menu->exec(QCursor::pos()); m_menu->deleteLater(); return true; +#endif } return false; } \ No newline at end of file