Ejemplo n.º 1
0
// Discards undoers in in case the UndoHistory is bigger than the given limit.
void UndoHistory::checkSizeLimit()
{
  // Is undo history too big?
  size_t groups = m_undoers->countUndoGroups();
  size_t undoLimit = m_delegate->getUndoSizeLimit();
  while (groups > 1 && m_undoers->getMemSize() > undoLimit) {
    discardTail();
    groups--;
  }
}
Ejemplo n.º 2
0
void FilePath::discardExtension()
{
    size_t pos = getPosExtension(RP_RetPosFailure);
    if(pos != std::string::npos)
        discardTail(pos);
}
Ejemplo n.º 3
0
void FilePath::discardFilename()
{
    discardTail(getPosEndDir());
}