mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-20 22:41:36 +00:00
Disable find-as-you-type keyboard searches in buffer viewer
* This will cause the model to evaluate every data item to search it, which is the exact thing we're trying to avoid with lazy item views.
This commit is contained in:
@@ -221,6 +221,12 @@ void RDTableView::keyPressEvent(QKeyEvent *e)
|
||||
return QTableView::keyPressEvent(e);
|
||||
}
|
||||
|
||||
void RDTableView::keyboardSearch(const QString &search)
|
||||
{
|
||||
if(m_allowKeyboardSearches)
|
||||
return QTableView::keyboardSearch(search);
|
||||
}
|
||||
|
||||
void RDTableView::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
const int gridWidth = showGrid() ? 1 : 0;
|
||||
|
||||
@@ -45,6 +45,10 @@ public:
|
||||
void setColumnWidths(const QList<int> &widths);
|
||||
void resizeColumnsToContents();
|
||||
|
||||
void setAllowKeyboardSearches(bool allow) { m_allowKeyboardSearches = allow; }
|
||||
bool allowKeyboardSearches() const { return m_allowKeyboardSearches; }
|
||||
void keyboardSearch(const QString &search) override;
|
||||
|
||||
void setCustomHeaderSizing(bool sizing) { m_horizontalHeader->setCustomSizing(sizing); }
|
||||
void setItemDelegate(QAbstractItemDelegate *delegate);
|
||||
QAbstractItemDelegate *itemDelegate() const;
|
||||
@@ -74,6 +78,8 @@ private:
|
||||
int m_pinnedColumns = 0;
|
||||
int m_columnGroupRole = 0;
|
||||
|
||||
bool m_allowKeyboardSearches = true;
|
||||
|
||||
RDHeaderView *m_horizontalHeader;
|
||||
|
||||
QModelIndex m_currentHoverIndex;
|
||||
|
||||
@@ -2221,6 +2221,10 @@ BufferViewer::BufferViewer(ICaptureContext &ctx, bool meshview, QWidget *parent)
|
||||
ui->vsoutData->setCustomHeaderSizing(true);
|
||||
ui->gsoutData->setCustomHeaderSizing(true);
|
||||
|
||||
ui->vsinData->setAllowKeyboardSearches(false);
|
||||
ui->vsoutData->setAllowKeyboardSearches(false);
|
||||
ui->gsoutData->setAllowKeyboardSearches(false);
|
||||
|
||||
QObject::connect(ui->fixedVars, &RDTreeWidget::customContextMenuRequested, this,
|
||||
&BufferViewer::fixedVars_contextMenu);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user