Bug 83187

Summary: In combined view, when switching from one feed to another, the scroll bar on the article list is not reset.
Product: [Applications] akregator Reporter: Gary Pendergast <pento>
Component: generalAssignee: Sashmit Bhaduri <smt>
Status: RESOLVED FIXED    
Severity: minor    
Priority: HI    
Version: 1.0-beta2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gary Pendergast 2004-06-10 23:30:26 UTC
Version:           1.0-beta2 (using KDE KDE 3.2.1)
Installed from:    SuSE RPMs
Compiler:          gcc version 3.3.3 (SuSE Linux) 
OS:                Linux

To reproduce:
1. Switch to Combined View (Settings -> Combined View)
2. Select a feed where the article text is longer than the article frame.
3. Scroll down some.
4. Select another feed where the article text is longer than the article frame.

Expected Result:
The scroll bar is reset to the top.

Actual Result:
It retains its old scroll value.
Comment 1 Stanislav Karchebny 2004-06-30 23:09:33 UTC
Scrollbars are not reset in all modes, need to drop their values on every article change.
Comment 2 Sashmit Bhaduri 2004-07-04 06:33:12 UTC
CVS commit by sashmit: 

- Scroll to top upon article change in combined view
- cleanup

CCMAIL: 83187-done@bugs.kde.org


  M +3 -5      articleviewer.cpp   1.38


--- kdenonbeta/akregator/src/articleviewer.cpp  #1.37:1.38
@@ -189,4 +189,5 @@ QString ArticleViewer::formatArticle(Fee
 void ArticleViewer::beginWriting()
 {
+    view()->setContentsPos(0,0);
     begin( KURL( "file:"+KGlobal::dirs()->saveLocation("cache", "akregator/Media/") ) );
     write(m_htmlHead);
@@ -206,6 +207,5 @@ void ArticleViewer::show(Feed *f, bool w
     if (writeHeaders)
     {
-        begin( KURL( "file:"+KGlobal::dirs()->saveLocation("cache", "akregator/Media/") ) );
-        write(m_htmlHead);
+        beginWriting();
     }
 
@@ -221,7 +221,5 @@ void ArticleViewer::show(Feed *f, bool w
     if (writeHeaders)
     {
-        m_currentText = text + "</body></html>";
-        write("</body></html>");
-        end();
+        endWriting();
     }
     else