summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 1b6ca4874..76b25715d 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -447,6 +447,7 @@ KMReaderWin::KMReaderWin(TQWidget *aParent,
mExternalWindow = (aParent == mainWindow );
mSplitterSizes << 180 << 100;
mMimeTreeMode = 1;
+ mMimeTreeModeOverride = -1;
mMimeTreeAtBottom = true;
mAutoDelete = false;
mLastSerNum = 0;
@@ -1449,10 +1450,11 @@ int KMReaderWin::pointsToPixel(int pointSize) const
//-----------------------------------------------------------------------------
void KMReaderWin::showHideMimeTree( bool isPlainTextTopLevel ) {
- mIsPlainText = isPlainTextTopLevel;
- if ( mMimeTreeMode == 2 ||
- ( mMimeTreeMode == 1 && !isPlainTextTopLevel ) )
+ if ( mMimeTreeModeOverride == 2 ||
+ ( mMimeTreeModeOverride != 0 && (mMimeTreeMode == 2 ||
+ ( mMimeTreeMode == 1 && !isPlainTextTopLevel ) ) ) ) {
mMimePartTree->show();
+ }
else {
// don't rely on TQSplitter maintaining sizes for hidden widgets:
TDEConfigGroup reader( KMKernel::config(), "Reader" );
@@ -1468,6 +1470,7 @@ void KMReaderWin::displayMessage() {
KMMessage * msg = message();
mMimePartTree->clear();
+ mMimeTreeModeOverride = -1; // clear any previous manual overiding
showHideMimeTree( !msg || // treat no message as "text/plain"
( msg->type() == DwMime::kTypeText
&& msg->subtype() == DwMime::kSubtypePlain ) );
@@ -2147,11 +2150,11 @@ void KMReaderWin::slotToggleFixedFont()
void KMReaderWin::slotToggleMimePartTree()
{
if ( mToggleMimePartTreeAction->isChecked() ) {
- mMimeTreeMode = 2; // always
+ mMimeTreeModeOverride = 2; // always
} else {
- mMimeTreeMode = 0; // never
+ mMimeTreeModeOverride = 0; // never
}
- showHideMimeTree();
+ showHideMimeTree(false);
}
//-----------------------------------------------------------------------------