-rw-r--r-- | core/apps/textedit/textedit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 8b3c4c6..af427ac 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -952,50 +952,51 @@ void TextEdit::clear() { void TextEdit::updateCaption( const QString &name ) { if ( name.isEmpty() ) setCaption( tr("Text Editor") ); else { QString s = name; if ( s.isNull() ) s = doc->name(); if ( s.isEmpty() ) { s = tr( "Unnamed" ); currentFileName=s; } // if(s.left(1) == "/") // s = s.right(s.length()-1); setCaption( s + " - " + tr("Text Editor") ); } } void TextEdit::setDocument(const QString& fileref) { if(fileref != "Unnamed") { currentFileName=fileref; qDebug("setDocument"); QFileInfo fi(currentFileName); qDebug("basename:"+fi.baseName()+": current filenmame "+currentFileName); - if(fi.baseName().left(1) == "") { - // openDotFile(currentFileName); + if( (fi.baseName().left(1)).isEmpty() ) { + openDotFile(currentFileName); + } else { qDebug("setDoc open"); bFromDocView = true; openFile(fileref); editor->setEdited(true); edited1=false; edited=true; // fromSetDocument=false; // doSearchBar(); } } updateCaption( currentFileName); } void TextEdit::changeFont() { QDialog *d = new QDialog ( this, "FontDialog", true ); d-> setCaption ( tr( "Choose font" )); QBoxLayout *lay = new QVBoxLayout ( d ); OFontSelector *ofs = new OFontSelector ( true, d ); lay-> addWidget ( ofs ); ofs-> setSelectedFont ( editor-> font ( )); d-> showMaximized ( ); if ( d-> exec ( ) == QDialog::Accepted ) |