Store the origin dbdir inside the GUI doc history, so we can later fetch documents from external indexes
This commit is contained in:
@@ -876,10 +876,7 @@ bool Preview::loadDocInCurrentTab(const Rcl::Doc &idoc, int docnum)
|
||||
|
||||
|
||||
// Enter document in document history
|
||||
string udi;
|
||||
if (idoc.getmeta(Rcl::Doc::keyudi, &udi)) {
|
||||
historyEnterDoc(g_dynconf, udi);
|
||||
}
|
||||
historyEnterDoc(rcldb, g_dynconf, idoc);
|
||||
|
||||
editor->setFocus();
|
||||
emit(previewExposed(this, m_searchId, docnum));
|
||||
|
||||
@@ -80,7 +80,7 @@ bool RclMain::containerUpToDate(Rcl::Doc& doc)
|
||||
}
|
||||
|
||||
// We can only run indexing on the main index (dbidx 0)
|
||||
bool ismainidx = rcldb->whatDbIdx(doc) == 0;
|
||||
bool ismainidx = rcldb->fromMainIndex(doc);
|
||||
// Indexer already running?
|
||||
bool ixnotact = (m_indexerState == IXST_NOTRUNNING);
|
||||
|
||||
|
||||
@@ -310,7 +310,9 @@ void RclMain::startNativeViewer(Rcl::Doc doc, int pagenum, QString term)
|
||||
}
|
||||
}
|
||||
|
||||
bool enterHistory = false;
|
||||
// Can't remember what enterHistory was actually for. Set it to
|
||||
// true always for now
|
||||
bool enterHistory = true;
|
||||
bool istempfile = false;
|
||||
|
||||
LOGDEB("StartNativeViewer: groksipath " << groksipath << " wantsf " <<
|
||||
@@ -451,8 +453,8 @@ void RclMain::execViewer(const map<string, string>& subs, bool enterHistory,
|
||||
stb->showMessage(msg, 10000);
|
||||
}
|
||||
|
||||
if (!enterHistory)
|
||||
historyEnterDoc(g_dynconf, doc.meta[Rcl::Doc::keyudi]);
|
||||
if (enterHistory)
|
||||
historyEnterDoc(rcldb, g_dynconf, doc);
|
||||
|
||||
// Do the zeitgeist thing
|
||||
zg_send_event(ZGSEND_OPEN, doc);
|
||||
|
||||
Reference in New Issue
Block a user