Extract variable and add comment in selection change recording
No functional change.
This commit is contained in:
parent
02d0584e0f
commit
016e1be77f
|
@ -204,9 +204,11 @@ void Context::SelectionHistory::end_edition()
|
||||||
|
|
||||||
if (m_history_id != HistoryId::Invalid and current_history_node().selections == m_staging->selections)
|
if (m_history_id != HistoryId::Invalid and current_history_node().selections == m_staging->selections)
|
||||||
{
|
{
|
||||||
auto& sels = m_history[(size_t)m_history_id].selections;
|
// No change, except maybe the index of the main selection.
|
||||||
sels.force_timestamp(m_staging->selections.timestamp());
|
// Update timestamp to potentially improve interaction with content undo.
|
||||||
sels.set_main_index(m_staging->selections.main_index());
|
auto& node = current_history_node();
|
||||||
|
node.selections.force_timestamp(m_staging->selections.timestamp());
|
||||||
|
node.selections.set_main_index(m_staging->selections.main_index());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user