Fix a bug with unsearched columns being highlighted
This commit is contained in:
parent
ca74b2bdaf
commit
a95dd74b9a
|
|
@ -251,7 +251,7 @@ QString AbstractStdTable::paintContent(QPainter* painter, dsint rowBase, int row
|
|||
painter->drawText(QRect(x + 4, y, w - 4, h), Qt::AlignVCenter | Qt::AlignLeft, text);
|
||||
text.clear();
|
||||
}
|
||||
else if(mHighlightText.length() && text.contains(mHighlightText, Qt::CaseInsensitive)) // TODO: case sensitive + regex highlighting
|
||||
else if(mHighlightText.length() && col >= mMinimumHighlightColumn && text.contains(mHighlightText, Qt::CaseInsensitive)) // TODO: case sensitive + regex highlighting
|
||||
{
|
||||
//super smart way of splitting while keeping the delimiters (thanks to cypher for guidance)
|
||||
int index = -2;
|
||||
|
|
|
|||
|
|
@ -54,9 +54,10 @@ public:
|
|||
void setCopyMenuOnly(bool bSet, bool bDebugOnly = true);
|
||||
|
||||
//draw helpers
|
||||
void setHighlightText(QString highlightText)
|
||||
void setHighlightText(QString highlightText, int minCol = 0)
|
||||
{
|
||||
mHighlightText = highlightText;
|
||||
mMinimumHighlightColumn = minCol;
|
||||
}
|
||||
|
||||
void setAddressColumn(int col, bool cipBase = false)
|
||||
|
|
@ -142,6 +143,7 @@ protected:
|
|||
QColor mTracedSelectedAddressBackgroundColor;
|
||||
bool bCipBase = false;
|
||||
QString mHighlightText;
|
||||
int mMinimumHighlightColumn = 0;
|
||||
int mAddressColumn = -1;
|
||||
bool bAddressLabel = true;
|
||||
bool bDisassemblyPopupEnabled = true;
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ void SearchListView::filterEntries()
|
|||
// Do not highlight with regex
|
||||
// TODO: fully respect highlighting mode
|
||||
if(mRegexCheckbox->checkState() == Qt::Unchecked)
|
||||
mAbstractSearchList->searchList()->setHighlightText(mFilterText);
|
||||
mAbstractSearchList->searchList()->setHighlightText(mFilterText, mSearchStartCol);
|
||||
else
|
||||
mAbstractSearchList->searchList()->setHighlightText(QString());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue