-rw-r--r-- | core/apps/textedit/textedit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index e41c69d..2f59ede 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -677,36 +677,39 @@ void TextEdit::showEditTools() // close(); // clear(); fileSelector->hide(); menu->show(); editBar->show(); if ( searchVisible ) searchBar->show(); // updateCaption(); editorStack->raiseWidget( editor ); setWState (WState_Reserved1 ); } /*! unprompted save */ bool TextEdit::save() { + QString file = doc->file(); + QString name= doc->name(); + QString rt = editor->text(); + currentFileName= file ; qDebug("saveFile "+currentFileName); - QString rt = editor->text(); - doc->setName( currentFileName); + doc->setName( name); FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { return false; } // if(doc) // delete doc; // doc = 0; editor->setEdited( false ); return true; } /*! prompted save */ bool TextEdit::saveAs() { qDebug("saveAsFile "+currentFileName); |