Skip to content

Commit 5cf2b32

Browse files
committed
Fix context menu open when GUI is closed
1 parent 3355289 commit 5cf2b32

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/kotlin/com/lambda/gui/components/HudGuiLayout.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,9 @@ object HudGuiLayout : Loadable, Configurable(HudConfig) {
136136
val (huds, notShown) = ModuleRegistry.modules
137137
.filterIsInstance<HudModule>()
138138
.partition { it.isEnabled }
139-
140139
notShown.forEach { SnapManager.unregisterElement(it.name) }
141140

142-
registerContextMenu(notShown)
143-
141+
if (ClickGuiLayout.open) registerContextMenu(notShown)
144142
if (ClickGuiLayout.open && !isLocked) {
145143
if (activeDragHudName != null && mouseDown) updateDragAndSnapping()
146144
if (activeDragHudName != null) drawDragGrid()

0 commit comments

Comments
 (0)