mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
MdTab: remove the duplication check when current header change
This commit is contained in:
parent
b0cd013988
commit
33c1229fb5
@ -182,15 +182,6 @@ bool VMdTab::scrollEditorToHeader(const VHeaderPointer &p_header)
|
||||
}
|
||||
}
|
||||
|
||||
// If the cursor are now under the right title, we should not change it right at
|
||||
// the title.
|
||||
int curBlockNumber = mdEdit->textCursor().block().blockNumber();
|
||||
if (m_outline.indexOfItemByBlockNumber(curBlockNumber)
|
||||
== m_outline.indexOfItemByBlockNumber(blockNumber)) {
|
||||
m_currentHeader = p_header;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mdEdit->scrollToHeader(blockNumber)) {
|
||||
m_currentHeader = p_header;
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user