Shader Editing: Fix problem where single Replace didn't work

Use the same findHash string in performReplace() as in performFind() by including the find direction in the findHash in performReplace()
This commit is contained in:
Jake Turner
2024-11-09 07:07:11 +00:00
parent 94b01feb22
commit 2443dbcb55
+2 -1
View File
@@ -6533,7 +6533,8 @@ void ShaderViewer::performReplace()
FindReplace::SearchContext context = m_FindReplace->context();
QString findHash = QFormatStr("%1%2%3").arg(find).arg(flags).arg((int)context);
bool down = m_FindReplace->direction() == FindReplace::Down;
QString findHash = QFormatStr("%1%2%3%4").arg(find).arg(flags).arg((int)context).arg(down);
// if we didn't have a valid previous find, just do a find and bail
if(findHash != m_FindState.hash)