diff --git a/NoteHighlightAddin/AddIn.cs b/NoteHighlightAddin/AddIn.cs index 95f1949..95b0077 100644 --- a/NoteHighlightAddin/AddIn.cs +++ b/NoteHighlightAddin/AddIn.cs @@ -399,10 +399,13 @@ private bool IsSelectedTextInline(string pageID) System.Collections.Generic.IEnumerable attrPos; if (table == null) { - if (node.Descendants(ns + "T").Where(n => n.Attribute("selected") != null && n.Attribute("selected").Value == "all").Count() > 0 - && node.Descendants(ns + "T").Where(n => n.Attribute("selected") == null || n.Attribute("selected").Value == "none").Count() > 0) + foreach (var oeNode in node.Descendants(ns + "OE")) { - return true; + if (oeNode.Descendants(ns + "T").Where(n => n.Attribute("selected") != null && n.Attribute("selected").Value == "all").Count() > 0 + && oeNode.Descendants(ns + "T").Where(n => n.Attribute("selected") == null || n.Attribute("selected").Value == "none").Count() > 0) + { + return true; + } } } }