mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Disable certain change tracking commands when there are no changes
Fix TODO
This commit is contained in:
parent
73dd3f4ecb
commit
05e38d1366
@ -1130,11 +1130,7 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
|||||||
case LFUN_CHANGE_PREVIOUS:
|
case LFUN_CHANGE_PREVIOUS:
|
||||||
case LFUN_ALL_CHANGES_ACCEPT:
|
case LFUN_ALL_CHANGES_ACCEPT:
|
||||||
case LFUN_ALL_CHANGES_REJECT:
|
case LFUN_ALL_CHANGES_REJECT:
|
||||||
// TODO: context-sensitive enabling of LFUNs
|
flag.setEnabled(buffer_.areChangesPresent());
|
||||||
// In principle, these command should only be enabled if there
|
|
||||||
// is a change in the document. However, without proper
|
|
||||||
// optimizations, this will inevitably result in poor performance.
|
|
||||||
flag.setEnabled(true);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_SCREEN_UP:
|
case LFUN_SCREEN_UP:
|
||||||
|
@ -138,6 +138,8 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
|||||||
<< ", author: " << change.author
|
<< ", author: " << change.author
|
||||||
<< ", time: " << long(change.changetime)
|
<< ", time: " << long(change.changetime)
|
||||||
<< ") in range (" << start << ", " << end << ")");
|
<< ") in range (" << start << ", " << end << ")");
|
||||||
|
if (!isChanged())
|
||||||
|
is_update_required_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Range const newRange(start, end);
|
Range const newRange(start, end);
|
||||||
|
Loading…
Reference in New Issue
Block a user