MCPcopy Create free account
hub / github.com/KDE/labplot / historyDialog

Method historyDialog

src/frontend/MainWin.cpp:2747–2764  ·  view source on GitHub ↗

/ dialogs ***************************************/ / ! shows the dialog with the Undo-history. */

Source from the content-addressed store, hash-verified

2745 shows the dialog with the Undo-history.
2746*/
2747void MainWin::historyDialog() {
2748 if (!m_project->undoStack())
2749 return;
2750
2751 auto* dialog = new HistoryDialog(this, m_project->undoStack(), m_undoViewEmptyLabel);
2752 int index = m_project->undoStack()->index();
2753 if (dialog->exec() != QDialog::Accepted) {
2754 if (m_project->undoStack()->count() != 0)
2755 m_project->undoStack()->setIndex(index);
2756 }
2757
2758 // disable undo/redo-actions if the history was cleared
2759 //(in both cases, when accepted or rejected in the dialog)
2760 if (m_project->undoStack()->count() == 0) {
2761 m_undoAction->setEnabled(false);
2762 m_redoAction->setEnabled(false);
2763 }
2764}
2765
2766/*!
2767 Opens the dialog to import data to the selected container

Callers

nothing calls this directly

Calls 6

execMethod · 0.80
undoStackMethod · 0.45
indexMethod · 0.45
countMethod · 0.45
setIndexMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected