Fixed detection of startup workbench

This commit is contained in:
Patryk Skowroński
2024-09-18 13:13:08 +02:00
parent d372aefa7c
commit f0884b1529
2 changed files with 3 additions and 2 deletions

View File

@@ -182,7 +182,8 @@ void NavlibInterface::enableNavigation()
exportCommands(std::string(wb));
});
exportCommands("StartWorkbench");
auto activeWorkbench = Gui::WorkbenchManager::instance()->activeName();
exportCommands(activeWorkbench);
initializePivot();
connectActiveTab();

View File

@@ -113,7 +113,7 @@ extern template SoCamera* NavlibInterface::getCamera<SoCamera*>() const;
long NavlibInterface::GetHitLookAt(navlib::point_t& position) const
{
if (is2DView())
if (is2DView() || !is3DView())
return navlib::make_result_code(navlib::navlib_errc::no_data_available);
const Gui::View3DInventorViewer* const inventorViewer = currentView.pView3d->getViewer();