summaryrefslogtreecommitdiff
path: root/src/plugins/cppcheck/cppcheckplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-02-26 13:04:30 +0100
committerEike Ziller <eike.ziller@qt.io>2020-02-26 14:12:01 +0000
commitc912ee6862031b807fc82a76cc5ee95a800eb0bb (patch)
tree7ce40c539677360e404b692e68eff400e01b659f /src/plugins/cppcheck/cppcheckplugin.cpp
parentaf52b65d6a6b4fe50deb074474c55817c669556f (diff)
downloadqt-creator-c912ee6862031b807fc82a76cc5ee95a800eb0bb.tar.gz
TextEditor: Fix scrolling state after splitting
And when restoring editors in other ways (like from a session). When splitting, the new editor was always scrolling to make the text cursor visible, even if it wasn't visible in the original. 1. open editor with long contents 2. scroll away from the text cursor, so the line isn't visible 3. split and wonder or 3. close and re-open Qt Creator, and restore the session Our code already does set the state of the new editor to the old one, but that state was destroyed by QPlainTextEdit::showEvent, which scrolls on first show if text was added to the document. So, wrap the showEvent with save/restoreState on first show. Change-Id: I95e0b4e963ebb33d13ce020affaf7fc7f94c9257 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cppcheck/cppcheckplugin.cpp')
0 files changed, 0 insertions, 0 deletions