When editing a shader, default to the edit base file

* In the case of a munged file with #line directives, we want to edit that file,
  not the split-out view of the file containing the entry point.
This commit is contained in:
baldurk
2022-08-11 10:23:48 +01:00
parent 605f8a0566
commit c3c791be55
+3 -2
View File
@@ -329,11 +329,12 @@ void ShaderViewer::editShader(ResourceId id, ShaderStage stage, const QString &e
w->setProperty("filename", kv.first);
w->setProperty("origText", kv.second);
if(text.contains(entryPoint))
if(sel == NULL)
{
sel = scintilla;
if(sel == scintilla || title.isEmpty())
title = tr(" - %1 - %2()").arg(name).arg(entryPoint);
}
}
if(sel != NULL)