Fix subpage check when merging edit triplet commands
This commit is contained in:
@@ -187,10 +187,11 @@ void EditTripletCommand::undo()
|
||||
|
||||
bool EditTripletCommand::mergeWith(const QUndoCommand *command)
|
||||
{
|
||||
const EditTripletCommand *previousCommand = static_cast<const EditTripletCommand *>(command);
|
||||
const EditTripletCommand *newerCommand = static_cast<const EditTripletCommand *>(command);
|
||||
|
||||
if (m_row != previousCommand->m_row)
|
||||
if (m_subPageIndex != newerCommand->m_subPageIndex || m_row != newerCommand->m_row)
|
||||
return false;
|
||||
m_newTriplet = previousCommand->m_newTriplet;
|
||||
|
||||
m_newTriplet = newerCommand->m_newTriplet;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ private:
|
||||
class EditTripletCommand : public QUndoCommand
|
||||
{
|
||||
public:
|
||||
enum { Id = 1 };
|
||||
enum { Id = 201 };
|
||||
enum EditTripletEnum { ETaddress, ETmode, ETdata };
|
||||
|
||||
EditTripletCommand(TeletextDocument *, X26Model *, int, int, int, int, int, QUndoCommand *parent = 0);
|
||||
|
||||
Reference in New Issue
Block a user