mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Change Find/Replace dialog to have Find Next/Find Previous buttons
* Enter and shift-enter in the find text go forwarwd and backwards respectively. * This replaces the previous system of selecting a direction explicitly and only ever going in that direction when finding.
This commit is contained in:
@@ -4098,7 +4098,7 @@ void ShaderViewer::find(bool down)
|
||||
|
||||
FindReplace::SearchContext context = m_FindReplace->context();
|
||||
|
||||
QString findHash = QFormatStr("%1%2%3").arg(find).arg(flags).arg((int)context);
|
||||
QString findHash = QFormatStr("%1%2%3%4").arg(find).arg(flags).arg((int)context).arg(down);
|
||||
|
||||
if(findHash != m_FindState.hash)
|
||||
{
|
||||
@@ -4106,6 +4106,9 @@ void ShaderViewer::find(bool down)
|
||||
m_FindState.start = 0;
|
||||
m_FindState.end = cur->length();
|
||||
m_FindState.offset = cur->currentPos();
|
||||
if(down && cur->selectionStart() == m_FindState.offset &&
|
||||
cur->selectionEnd() - m_FindState.offset == find.length())
|
||||
m_FindState.offset += find.length();
|
||||
}
|
||||
|
||||
int start = m_FindState.start + m_FindState.offset;
|
||||
|
||||
Reference in New Issue
Block a user