MCPcopy Create free account
hub / github.com/baldurk/renderdoc / on_resetEdits_clicked

Method on_resetEdits_clicked

qrenderdoc/Windows/ShaderViewer.cpp:6507–6531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6505}
6506
6507void ShaderViewer::on_resetEdits_clicked()
6508{
6509 QMessageBox::StandardButton res =
6510 RDDialog::question(this, tr("Are you sure?"),
6511 tr("Are you sure you want to reset all edits and restore the "
6512 "shader source back to the original?"),
6513 QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
6514
6515 if(res != QMessageBox::Yes)
6516 return;
6517
6518 for(ScintillaEdit *s : m_Scintillas)
6519 {
6520 QWidget *w = (QWidget *)s;
6521 s->selectAll();
6522 s->replaceSel(w->property("origText").toString().toUtf8().data());
6523 }
6524
6525 m_RevertCallback(&m_Ctx, this, m_EditingShader);
6526
6527 m_Modified = false;
6528 m_Saved = false;
6529
6530 updateEditState();
6531}
6532
6533void ShaderViewer::on_unrefresh_clicked()
6534{

Callers

nothing calls this directly

Calls 8

questionFunction · 0.85
selectAllMethod · 0.80
replaceSelMethod · 0.80
toUtf8Method · 0.80
propertyMethod · 0.80
trFunction · 0.50
dataMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected