From d1d849bab2d54b1e9144bca1f30786882be9a464 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Mon, 16 Dec 2002 04:34:10 +0000 Subject: work around for changing wrap changing edited state. also fixed opening dotFiles line endings --- (limited to 'core/apps/textedit/textedit.cpp') diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index af427ac..bd7cfb6 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -553,8 +553,15 @@ void TextEdit::setItalic(bool y) { void TextEdit::setWordWrap(bool y) { bool state = editor->edited(); + QString captionStr = caption(); + bool b1 = edited1; + bool b2 = edited; + editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); editor->setEdited( state ); + edited1=b1; + edited=b2; + setCaption(captionStr); } void TextEdit::setSearchBar(bool b) { @@ -684,7 +691,7 @@ void TextEdit::openDotFile( const QString &f ) { file.open(IO_ReadWrite); QTextStream t(&file); while ( !t.atEnd()) { - txt+=t.readLine(); + txt+=t.readLine()+"\n"; } editor->setText(txt); editor->setEdited( false); -- cgit v0.9.0.2