| 1817 | } |
| 1818 | |
| 1819 | void CaptureContext::SaveChanges() |
| 1820 | { |
| 1821 | bool success = true; |
| 1822 | |
| 1823 | if(!m_Replay.GetCaptureFile()) |
| 1824 | { |
| 1825 | success = false; |
| 1826 | } |
| 1827 | else |
| 1828 | { |
| 1829 | if(m_CaptureMods & CaptureModifications::Renames) |
| 1830 | success &= SaveRenames(); |
| 1831 | |
| 1832 | if(m_CaptureMods & CaptureModifications::Bookmarks) |
| 1833 | success &= SaveBookmarks(); |
| 1834 | |
| 1835 | if(m_CaptureMods & CaptureModifications::Notes) |
| 1836 | success &= SaveNotes(); |
| 1837 | |
| 1838 | if(m_CaptureMods & CaptureModifications::EditedShaders) |
| 1839 | success &= SaveEdits(); |
| 1840 | } |
| 1841 | |
| 1842 | if(!success) |
| 1843 | { |
| 1844 | RDDialog::critical(m_MainWindow, tr("Can't save file"), |
| 1845 | tr("Error saving file.\n" |
| 1846 | "Check for permissions and that it's not open elsewhere")); |
| 1847 | } |
| 1848 | |
| 1849 | m_CaptureMods = CaptureModifications::NoModifications; |
| 1850 | } |
| 1851 | |
| 1852 | bool CaptureContext::SaveRenames() |
| 1853 | { |
nothing calls this directly
no test coverage detected