Bug 168160

Summary: sticky notes plasmoid does not remember scroll location
Product: [Plasma] plasma4 Reporter: Jason A. Donenfeld <Jason>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aseigo
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch for saving and restoring scroll value in notes plasmoid

Description Jason A. Donenfeld 2008-08-02 23:40:51 UTC
Version:            (using KDE 4.1.0)
Installed from:    Gentoo Packages

1) make a long sticky note that scrolls
2) scroll down to somewhere
3) restart kde
Result: sticky note is scrolled at top


Instead the sticky note should scroll to the location it was before restarting kde.
Comment 1 Björn Ruberg 2008-08-22 23:35:59 UTC
Created attachment 26991 [details]
Patch for saving and restoring scroll value in notes plasmoid

I have made a patch that implements that functionality. 

It currently does not work when the note is in the panel. And it has a problem scrolling at the bottom line. But I suspect that's a bug somewhere else and not the fault of notes or this patch. Or does anybody have clue why saving with this line 
cg.writeEntry("scrollValue", QVariant(m_textEdit->nativeWidget()->verticalScrollBar()->value())); 

and restoring with this code 
int scrollValue = cg.readEntry("scrollValue").toInt(); 
if(scrollValue){ m_textEdit->nativeWidget()->verticalScrollBar()->setValue(scrollValue); 
} 

might not work?