Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java')
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
index e615e4314..1205ced1a 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
@@ -970,9 +970,8 @@ public class CheatSheetViewer implements ICheatSheetViewer, IMenuContributor {
* @return whether the current item opens a modal dialog
*/
private boolean isInDialogItem() {
- ViewItem item = getViewItemAtIndex(currentItemNum);
- if (item != null) {
- return item.getItem().isDialog();
+ if (currentItem != null) {
+ return currentItem.getItem().isDialog();
}
return false;
}

Back to the top