Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 6724 → Rev 6725

/branches/Version13x/Scribus/scribus/scribus.cpp
1946,7 → 1946,7
{
doc->OpenNodes = outlinePalette->buildReopenVals();
}
undoManager->setUndoEnabled(false);
MarginStruct margins(topMargin, leftMargin, bottomMargin, rightMargin);
DocPagesSetup pagesSetup(pageArrangement, firstPageLocation, firstPageNumber, orientation, autoTextFrames, columnDistance, columnCount);
QString newDocName( tr("Document")+"-"+QString::number(DocNr));
2037,6 → 2037,7
styleManager->currentDoc(tempDoc);
tocGenerator->setDoc(tempDoc);
}
undoManager->setUndoEnabled(true);
return tempDoc;
}
 
2099,11 → 2100,7
ActWin = scw;
if (ActWin->doc()==NULL)
return;
QString oldDocName = "";
if (ActWin && ActWin->doc())
{
oldDocName = ActWin->doc()->DocName;
}
 
/* if (doc != NULL)
{
if ((HaveDoc) && (doc != ActWin->doc))
2110,12 → 2107,9
doc->OpenNodes = outlinePalette->buildReopenVals();
} */
docCheckerPalette->clearErrorList();
QString newDocName = "";
if (ActWin && ActWin->doc())
newDocName = ActWin->doc()->DocName;
 
if (oldDocName != newDocName)
undoManager->switchStack(newDocName);
doc = ActWin->doc();
undoManager->switchStack(doc->DocName);
 
if (view!=NULL)
{
2127,7 → 2121,7
//disconnect(doc->m_Selection, SIGNAL(empty()), 0, 0);
}
}
doc = ActWin->doc();
 
view = ActWin->view();
actionManager->connectNewViewActions(view);
actionManager->disconnectNewDocActions();
/branches/Version13x/Scribus/scribus/undomanager.cpp
317,6 → 317,8
 
void UndoManager::switchStack(const QString& stackName)
{
if (stackName == currentDoc_)
return; // already current stack
currentDoc_ = stackName;
if (!stacks_.contains(currentDoc_))
stacks_[currentDoc_] = UndoStack();