MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / toggleFormat

Method toggleFormat

gui/qt/basiccodeviewerwindow.cpp:296–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void BasicCodeViewerWindow::toggleFormat() {
297 m_showingFormatted = !m_showingFormatted;
298 const int scrollValue = ui->basicEdit->verticalScrollBar()->value();
299 ui->basicEdit->document()->setPlainText(m_showingFormatted ? m_formattedCode : m_originalCode);
300 ui->basicEdit->verticalScrollBar()->setValue(scrollValue);
301 showCode();
302}
303
304void BasicCodeViewerWindow::showCode() {
305 if (!hasCodeYet) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected