diff options
Diffstat (limited to 'Userland/Applications/Browser/InspectorWidget.cpp')
-rw-r--r-- | Userland/Applications/Browser/InspectorWidget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Applications/Browser/InspectorWidget.cpp b/Userland/Applications/Browser/InspectorWidget.cpp index a8053d8c4e..115f1ed281 100644 --- a/Userland/Applications/Browser/InspectorWidget.cpp +++ b/Userland/Applications/Browser/InspectorWidget.cpp @@ -41,13 +41,15 @@ InspectorWidget::InspectorWidget() auto& top_tab_widget = splitter.add<GUI::TabWidget>(); m_dom_tree_view = top_tab_widget.add_tab<GUI::TreeView>("DOM"); - m_dom_tree_view->on_selection = [this](auto& index) { + m_dom_tree_view->on_selection_change = [this] { + const auto& index = m_dom_tree_view->selection().first(); auto* node = static_cast<Web::DOM::Node*>(index.internal_data()); set_inspected_node(node); }; m_layout_tree_view = top_tab_widget.add_tab<GUI::TreeView>("Layout"); - m_layout_tree_view->on_selection = [this](auto& index) { + m_layout_tree_view->on_selection_change = [this] { + const auto& index = m_layout_tree_view->selection().first(); auto* node = static_cast<Web::Layout::Node*>(index.internal_data()); set_inspected_node(node->dom_node()); }; |