<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: dvratil, dfaure.<br />Herald added a project: KDE PIM.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29107">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If the very first block of the document has some style, the cursor is not aware of it.<br />
However, explicitly telling to move the cursor to the start of the document makes the cursor catch up the style<br />
(it's probably slighly better than moving cursor to the left / to the right).</p>

<p>The best I could find was this stackoveflow, unfortunately:<br />
<a href="https://stackoverflow.com/questions/37160039/set-default-character-format-in-qtextdocument" class="remarkup-link" target="_blank" rel="noreferrer">https://stackoverflow.com/questions/37160039/set-default-character-format-in-qtextdocument</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Make a document starting with a, say, bold word</li>
<li class="remarkup-list-item">Close && Reopen KJots (so that it doesn't reload already used cursor)</li>
<li class="remarkup-list-item">Reopen this document -> the cursor is shown as bold from the very beginning</li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>R573 KJots</div></div></div><br /><div><strong>BRANCH</strong><div><div>workaround (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29107">https://phabricator.kde.org/D29107</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kjotsedit.cpp<br />
src/kjotsedit.h<br />
src/kjotswidget.cpp</div></div></div><br /><div><strong>To: </strong>poboiko, dvratil, dfaure<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>