Qt: Fix CodeWidget navigation

Changed itemSelectionChanged and itemClicked signal to itemPressed in CodeWidget.
Holding mouse down and moving will only travel up/down the stack one time.
This fixes the common occurrence of unintentionally traveling deeper down the stack or higher up the callstack than intended.
This commit is contained in:
dreamsyntax 2019-05-15 22:13:57 -07:00 committed by Léo Lam
parent ec734065db
commit e06a62d9d1
1 changed files with 4 additions and 5 deletions

View File

@ -155,12 +155,11 @@ void CodeWidget::ConnectWidgets()
connect(m_search_address, &QLineEdit::textChanged, this, &CodeWidget::OnSearchAddress);
connect(m_search_symbols, &QLineEdit::textChanged, this, &CodeWidget::OnSearchSymbols);
connect(m_symbols_list, &QListWidget::itemClicked, this, &CodeWidget::OnSelectSymbol);
connect(m_callstack_list, &QListWidget::itemSelectionChanged, this,
&CodeWidget::OnSelectCallstack);
connect(m_function_calls_list, &QListWidget::itemSelectionChanged, this,
connect(m_symbols_list, &QListWidget::itemPressed, this, &CodeWidget::OnSelectSymbol);
connect(m_callstack_list, &QListWidget::itemPressed, this, &CodeWidget::OnSelectCallstack);
connect(m_function_calls_list, &QListWidget::itemPressed, this,
&CodeWidget::OnSelectFunctionCalls);
connect(m_function_callers_list, &QListWidget::itemSelectionChanged, this,
connect(m_function_callers_list, &QListWidget::itemPressed, this,
&CodeWidget::OnSelectFunctionCallers);
connect(m_code_view, &CodeViewWidget::SymbolsChanged, this, &CodeWidget::UpdateSymbols);