diff --git a/plugins/dwarfmonitor.cpp b/plugins/dwarfmonitor.cpp index 2ea811f38..1ee1c8db8 100644 --- a/plugins/dwarfmonitor.cpp +++ b/plugins/dwarfmonitor.cpp @@ -1543,6 +1543,11 @@ public: dwarf_column.setHighlight(0); } + df::unit *getSelectedUnit() override + { + return (selected_column == 1) ? dwarf_column.getFirstSelectedElem() : nullptr; + } + void feed(set *input) { bool key_processed = false; @@ -1574,7 +1579,7 @@ public: } else if (input->count(interface_key::CUSTOM_SHIFT_Z)) { - df::unit *selected_unit = (selected_column == 1) ? dwarf_column.getFirstSelectedElem() : nullptr; + df::unit *selected_unit = getSelectedUnit(); if (selected_unit) { input->clear();