if text is empty, display fields by default

This commit is contained in:
dockes 2009-11-23 17:38:37 +00:00
parent 4cac0f56b5
commit dcc9860104

View File

@ -931,8 +931,14 @@ bool Preview::loadDocInCurrentTab(const Rcl::Doc &idoc, int docnum)
progress.close();
fdoc.text.clear();
// Maybe the text was actually empty ? Switch to fields then. Else free-up
// the text memory.
bool textempty = fdoc.text.empty();
if (!textempty)
fdoc.text.clear();
editor->m_data.fdoc = fdoc;
if (textempty)
editor->toggleFields();
m_haveAnchors = m_plaintorich.lastanchor != 0;
if (searchTextLine->text().length() != 0) {