Ejemplo n.º 1
0
void Imposition::accepted()
{
	if (isEdited == true) changePage();

	ScribusMainWindow* scMW = ScCore->primaryMainWindow();
			
	w->setMainWindow(scMW);
	
	w->setView(view);
	
	scMW->alignDistributePalette->setDoc(targetDoc);
	
	scMW->ActWin = w;
	
	targetDoc->WinHan = w;
	
	scMW->wsp->addWindow(w);
	
	scMW->HaveDoc++;
	scMW->HaveNewDoc();
	targetDoc->reformPages();
	
	w->show();
	view->show();
	scMW->newActWin(w);
	targetDoc->setCurrentPage(targetDoc->DocPages.at(0));
	view->zoom();
	view->GotoPage(0);

	connect(scMW->wsp, SIGNAL(windowActivated(QWidget *)), scMW, SLOT(newActWin(QWidget *)));
	connect(w, SIGNAL(AutoSaved()), scMW, SLOT(slotAutoSaved()));
	connect(UndoManager::instance(), SIGNAL(undoRedoDone()), view, SLOT(DrawNew()));
	targetDoc->connectDocSignals();
	UndoManager::instance()->setUndoEnabled(true);
}
Ejemplo n.º 2
0
void UndoManager::redo(int steps)
{
	if (!undoEnabled_)
		return;

	emit undoRedoBegin();
	setUndoEnabled(false);
	stacks_[currentDoc_].redo(steps, currentUndoObjectId_);
	setUndoEnabled(true);
	emit redoSignal(steps);
	emit undoRedoDone();
	setTexts();
}