Fix issue #41: Clicking button of actors on sidebar not change map or notes
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 22:30:17 +00:00
parent 4d532d10ae
commit 8348936122
2 changed files with 119 additions and 3 deletions

View File

@@ -219,9 +219,11 @@ async function fetchCampaignEntries(entityType = activeSection.value, silent = f
function selectSection(section) {
activeSection.value = section;
if (isEntrySection(section)) fetchCampaignEntries(section);
// The content area follows the sidebar: maps shows the anchored map, everything else the
// notes that are currently open.
SetActivePane(section === 'maps' && AnchoredMap.value ? 'map' : 'notes');
// Only the notes and maps buttons say something about the note container: they switch it between
// the notes that are open and the anchored map. Actors and items open windows of their own, so
// their buttons leave whatever the note container was showing untouched.
if (section === 'notes') SetActivePane('notes');
else if (section === 'maps' && AnchoredMap.value) SetActivePane('map');
}
function createEntry(entityType) {