Browse Source

Debugger: The element info's list of children now shows the title of any documents

Michael Ragazzon 3 years ago
parent
commit
ac60bc1c64
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/Debugger/ElementInfo.cpp

+ 5 - 1
Source/Debugger/ElementInfo.cpp

@@ -599,7 +599,11 @@ void ElementInfo::UpdateSourceElement()
 				if (IsDebuggerElement(child))
 					continue;
 
-				const String child_name = child->GetAddress(false, false);
+				String child_name = child->GetAddress(false, false);
+				auto document = rmlui_dynamic_cast<ElementDocument*>(child);
+				if (document && !document->GetTitle().empty())
+					child_name += " (" + document->GetTitle() + ')';
+
 				const char* non_dom_string = (i >= num_dom_children ? " class=\"non_dom\"" : "");
 
 				children += CreateString(child_name.size() + 40, "<p id=\"c %d\"%s>%s</p>", i, non_dom_string, child_name.c_str());