MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / revertScript

Method revertScript

scriptingwindow.cpp:325–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void ScriptingWindow::revertScript()
326{
327 QMessageBox msgBox;
328 msgBox.setText("Are you sure you'd like to revert?");
329 msgBox.setInformativeText("Really do it?");
330 msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
331 msgBox.setDefaultButton(QMessageBox::Cancel);
332 int ret = msgBox.exec();
333 switch (ret)
334 {
335 case QMessageBox::Yes:
336 //just grab the last stored copy of the script (last compiled version) and replace current text with that text
337 editor->setPlainText(currentScript->scriptText);
338 break;
339 case QMessageBox::No:
340 break;
341 default:
342 // should never be reached
343 break;
344 }
345}
346
347void ScriptingWindow::recompileScript()
348{

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.80

Tested by

no test coverage detected