diff --git a/src/lms/ui/LmsApplication.cpp b/src/lms/ui/LmsApplication.cpp index 62f9b1ed..5d1a1b58 100644 --- a/src/lms/ui/LmsApplication.cpp +++ b/src/lms/ui/LmsApplication.cpp @@ -525,6 +525,7 @@ namespace lms::ui }); mainRouter->activate(); + doJavaScript(javaScriptClass() + ".updateActiveNav('" + wApp->internalPath() + "')"); } void LmsApplication::notify(const Wt::WEvent& event) diff --git a/src/lms/ui/common/PathRouter.cpp b/src/lms/ui/common/PathRouter.cpp index 263242ca..11f9a60e 100644 --- a/src/lms/ui/common/PathRouter.cpp +++ b/src/lms/ui/common/PathRouter.cpp @@ -38,11 +38,10 @@ namespace lms::ui void PathRouter::activate() { - handlePathChange(); - LmsApp->internalPathChanged().connect(this, [this] { handlePathChange(); }); + handlePathChange(); } void PathRouter::handlePathChange()