-rw-r--r-- | core/apps/textedit/textedit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index dafe1dc..f031a0f 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -856,48 +856,51 @@ void TextEdit::updateCaption( const QString &name ) setCaption( tr("Text Editor") ); else { QString s = name; if ( s.isNull() ) s = doc->name(); if ( s.isEmpty() ) { s = tr( "Unnamed" ); currentFileName=s; } setCaption( s + " - " + tr("Text Editor") ); } } void TextEdit::setDocument(const QString& fileref) { bFromDocView = TRUE; qDebug("setDocument "+fileref); bFromDocView = TRUE; if(fileref.find(".desktop",0,TRUE) == -1) { openFile(fileref); } else { openFile(DocLnk(fileref)); } + editor->setEdited(TRUE); + edited1=FALSE; + edited=TRUE; } void TextEdit::closeEvent( QCloseEvent *e ) { if ( editorStack->visibleWidget() == fileSelector && !bFromDocView ) { e->ignore(); repaint(); // fileRevert(); } else { bFromDocView = FALSE; e->accept(); } } void TextEdit::accept() { QString file = doc->file(); if (file.find("_.txt",0,TRUE) ==-1) save(); else { QFile(file).remove(); } exit(0); |