mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Remove default parameter of UndoGroupHelper constructor
This can lead to mistakes. If no buffer is required at the beginning,
it is better to pass 'nullptr' explicitly.
Fix a case of missing parameter in GuiCompleter (introduced at
f3656600
). This avoids some spurious "There is no group open (creating
one)" messages.
This commit is contained in:
parent
8099b9f8e6
commit
967f4d661e
@ -139,7 +139,7 @@ private:
|
||||
*/
|
||||
class UndoGroupHelper {
|
||||
public:
|
||||
UndoGroupHelper(Buffer * buf = 0);
|
||||
UndoGroupHelper(Buffer * buf);
|
||||
|
||||
~UndoGroupHelper();
|
||||
|
||||
|
@ -687,7 +687,7 @@ void GuiCompleter::tab()
|
||||
}
|
||||
|
||||
// Make undo possible
|
||||
UndoGroupHelper ugh;
|
||||
UndoGroupHelper ugh(cur.buffer());
|
||||
cur.recordUndo();
|
||||
|
||||
// If completion is active, at least complete by one character
|
||||
|
@ -121,7 +121,7 @@ void InsetLabel::updateLabelAndRefs(docstring const & new_label,
|
||||
void InsetLabel::updateReferences(docstring const & old_label,
|
||||
docstring const & new_label)
|
||||
{
|
||||
UndoGroupHelper ugh;
|
||||
UndoGroupHelper ugh(nullptr);
|
||||
if (buffer().masterParams().track_changes) {
|
||||
// With change tracking, we insert a new ref and
|
||||
// delete the old one
|
||||
|
Loading…
Reference in New Issue
Block a user