Hide bookmarkItemPulling button if currently opened gui is not supported (#419)

* [minor] hide pullBookmarkedItems button if open container is not supported

* [minor] spotless apply
This commit is contained in:
Nico Spiske authored and GitHub committed 2023-09-08 07:16:37 +02:00
1 parent c732361bbc
commit 153da523d6
1 file changed
+4 -2
@@ -868,7 +868,9 @@ public class BookmarkPanel extends PanelWidget {
LayoutManager.addWidget(namespacePrev);
LayoutManager.addWidget(namespaceNext);
LayoutManager.addWidget(namespaceLabel);
LayoutManager.addWidget(pullBookmarkedItems);
if (BookmarkContainerInfo.getBookmarkContainerHandler(getGuiContainer()) != null) {
LayoutManager.addWidget(pullBookmarkedItems);
}
}
}
@@ -1056,7 +1058,7 @@ public class BookmarkPanel extends PanelWidget {
tooltip.add(translate("bookmark.viewmode.toggle.tip"));
}
if (new Rectangle4i(pullBookmarkedItems.x, pullBookmarkedItems.y, pullBookmarkedItems.w, pullBookmarkedItems.h)
.contains(mx, my)) {
.contains(mx, my) && BookmarkContainerInfo.getBookmarkContainerHandler(getGuiContainer()) != null) {
tooltip.add(translate("bookmark.pullBookmarkedItems.tip"));
}