From bbdb963f5ae508f4f52a9f9f3b8e275591e0ce1b Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sat, 12 Dec 2015 15:54:17 +0100 Subject: [PATCH] Remember the "Ignore out of date index data" decision for the rest of the session --- src/qtgui/rclm_preview.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/qtgui/rclm_preview.cpp b/src/qtgui/rclm_preview.cpp index 97298155..3008bf86 100644 --- a/src/qtgui/rclm_preview.cpp +++ b/src/qtgui/rclm_preview.cpp @@ -53,8 +53,10 @@ void RclMain::previewClosed(Preview *w) // config) bool RclMain::containerUpToDate(Rcl::Doc& doc) { + static bool ignore_out_of_date_preview = false; + // If ipath is empty, we decide we don't care. Also, we need an index, - if (doc.ipath.empty() || rcldb == 0) + if (ignore_out_of_date_preview || doc.ipath.empty() || rcldb == 0) return true; string udi; @@ -93,11 +95,12 @@ bool RclMain::containerUpToDate(Rcl::Doc& doc) "improve when it's done. "); } else if (ixnotact) { // Not main index - msg += tr("The document belongs to an external index" + msg += tr("The document belongs to an external index " "which I can't update. "); } - msg += tr("Click Cancel to return to the list. " - "Click Ignore to show the preview anyway. "); + msg += tr("Click Cancel to return to the list.
" + "Click Ignore to show the preview anyway (and remember for " + "this session)."); QMessageBox::StandardButtons bts = QMessageBox::Ignore | QMessageBox::Cancel; @@ -115,9 +118,12 @@ bool RclMain::containerUpToDate(Rcl::Doc& doc) vector docs(1, doc); updateIdxForDocs(docs); } - if (rep != QMessageBox::Ignore) + if (rep == QMessageBox::Ignore) { + ignore_out_of_date_preview = true; + return true; + } else { return false; - return true; + } } /**