Really simplify refresh signalling
Amendment to a468032, where refresh signal was not taken out of row loops.
This commit is contained in:
@@ -381,8 +381,9 @@ void CutCommand::redo()
|
||||
for (int r=m_selectionTopRow; r<=m_selectionBottomRow; r++) {
|
||||
for (int c=m_selectionLeftColumn; c<=m_selectionRightColumn; c++)
|
||||
m_teletextDocument->currentSubPage()->setCharacter(r, c, 0x20);
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
}
|
||||
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
}
|
||||
|
||||
void CutCommand::undo()
|
||||
@@ -397,10 +398,11 @@ void CutCommand::undo()
|
||||
for (int c=m_selectionLeftColumn; c<=m_selectionRightColumn; c++)
|
||||
m_teletextDocument->currentSubPage()->setCharacter(r, c, m_deletedCharacters[arrayR].at(arrayC++));
|
||||
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
arrayR++;
|
||||
}
|
||||
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
|
||||
m_teletextDocument->setSelectionCorner(m_selectionCornerRow, m_selectionCornerColumn);
|
||||
m_teletextDocument->moveCursor(m_row, m_column, true);
|
||||
}
|
||||
@@ -635,9 +637,6 @@ void PasteCommand::redo()
|
||||
}
|
||||
}
|
||||
|
||||
if (r < 25)
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
|
||||
arrayR++;
|
||||
// If paste area is taller than clipboard data, repeat the pattern
|
||||
// if it wasn't plain text
|
||||
@@ -649,6 +648,8 @@ void PasteCommand::redo()
|
||||
}
|
||||
}
|
||||
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
|
||||
if (m_selectionActive) {
|
||||
m_teletextDocument->setSelectionCorner(m_selectionCornerRow, m_selectionCornerColumn);
|
||||
m_teletextDocument->moveCursor(m_row, m_column, true);
|
||||
@@ -678,12 +679,11 @@ void PasteCommand::undo()
|
||||
arrayC++;
|
||||
}
|
||||
|
||||
if (r < 25)
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
|
||||
arrayR++;
|
||||
}
|
||||
|
||||
emit m_teletextDocument->contentsChanged();
|
||||
|
||||
if (!m_selectionActive)
|
||||
m_teletextDocument->moveCursor(m_row, m_column);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user