author | llornkcor <llornkcor> | 2002-12-16 04:34:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-16 04:34:10 (UTC) |
commit | d1d849bab2d54b1e9144bca1f30786882be9a464 (patch) (unidiff) | |
tree | 4a17e9dba5e5ec84cd2344f55640b262d57f0d96 | |
parent | 71f0618e5fdfe7c7f5c251fef3885ee3833d1046 (diff) | |
download | opie-d1d849bab2d54b1e9144bca1f30786882be9a464.zip opie-d1d849bab2d54b1e9144bca1f30786882be9a464.tar.gz opie-d1d849bab2d54b1e9144bca1f30786882be9a464.tar.bz2 |
work around for changing wrap changing edited state. also fixed opening dotFiles line endings
-rw-r--r-- | core/apps/textedit/textedit.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 | |||
@@ -552,10 +552,17 @@ void TextEdit::setItalic(bool y) { | |||
552 | } | 552 | } |
553 | 553 | ||
554 | void TextEdit::setWordWrap(bool y) { | 554 | void TextEdit::setWordWrap(bool y) { |
555 | bool state = editor->edited(); | 555 | bool state = editor->edited(); |
556 | QString captionStr = caption(); | ||
557 | bool b1 = edited1; | ||
558 | bool b2 = edited; | ||
559 | |||
556 | editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); | 560 | editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); |
557 | editor->setEdited( state ); | 561 | editor->setEdited( state ); |
562 | edited1=b1; | ||
563 | edited=b2; | ||
564 | setCaption(captionStr); | ||
558 | } | 565 | } |
559 | 566 | ||
560 | void TextEdit::setSearchBar(bool b) { | 567 | void TextEdit::setSearchBar(bool b) { |
561 | useSearchBar=b; | 568 | useSearchBar=b; |
@@ -683,9 +690,9 @@ void TextEdit::openDotFile( const QString &f ) { | |||
683 | QFile file(f); | 690 | QFile file(f); |
684 | file.open(IO_ReadWrite); | 691 | file.open(IO_ReadWrite); |
685 | QTextStream t(&file); | 692 | QTextStream t(&file); |
686 | while ( !t.atEnd()) { | 693 | while ( !t.atEnd()) { |
687 | txt+=t.readLine(); | 694 | txt+=t.readLine()+"\n"; |
688 | } | 695 | } |
689 | editor->setText(txt); | 696 | editor->setText(txt); |
690 | editor->setEdited( false); | 697 | editor->setEdited( false); |
691 | edited1=false; | 698 | edited1=false; |