/ dialogs ***************************************/ / ! shows the dialog with the Undo-history. */
| 2745 | shows the dialog with the Undo-history. |
| 2746 | */ |
| 2747 | void 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 |