r17213 by craig - #4828: Allow undo/redo of moving pages

scribus-commit scribus-commit at lists.scribus.net
Wed Jan 18 21:51:08 UTC 2012


Author: craig
Date: Wed Jan 18 21:51:08 2012
New Revision: 17213

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17213
Log:
#4828: Allow undo/redo of moving pages

Modified:
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/scribusview.h
    trunk/Scribus/scribus/ui/masterpagepalette.cpp
    trunk/Scribus/scribus/ui/pagepalette.cpp
    trunk/Scribus/scribus/undomanager.cpp
    trunk/Scribus/scribus/undomanager.h

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Wed Jan 18 21:51:08 2012
@@ -572,9 +572,9 @@
 
 	connect( (*scrActions)["pageInsert"], SIGNAL(triggered()), mainWindow, SLOT(slotNewPageM()) );
 	connect( (*scrActions)["pageImport"], SIGNAL(triggered()), mainWindow, SLOT(slotPageImport()) );
-	connect( (*scrActions)["pageDelete"], SIGNAL(triggered()), mainWindow, SLOT(DeletePage()) );
-	connect( (*scrActions)["pageCopy"], SIGNAL(triggered()), mainWindow, SLOT(CopyPage()) );
-	connect( (*scrActions)["pageMove"], SIGNAL(triggered()), mainWindow, SLOT(MovePage()) );
+	connect( (*scrActions)["pageDelete"], SIGNAL(triggered()), mainWindow, SLOT(deletePage()) );
+	connect( (*scrActions)["pageCopy"], SIGNAL(triggered()), mainWindow, SLOT(copyPage()) );
+	connect( (*scrActions)["pageMove"], SIGNAL(triggered()), mainWindow, SLOT(movePage()) );
 	connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(triggered()), mainWindow, SLOT(ApplyMasterPage()) );
 	connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(triggered()), mainWindow, SLOT(duplicateToMasterPage()) );
 	connect( (*scrActions)["pageManageMargins"], SIGNAL(triggered()), mainWindow, SLOT(changePageMargins()) );

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp Wed Jan 18 21:51:08 2012
@@ -381,7 +381,7 @@
 	}
 	bool oldMode = ScCore->primaryMainWindow()->doc->masterPageMode();
 	ScCore->primaryMainWindow()->doc->setMasterPageMode(true);
-	ScCore->primaryMainWindow()->DeletePage2(ScCore->primaryMainWindow()->doc->MasterNames[masterPageName]);
+	ScCore->primaryMainWindow()->deletePage2(ScCore->primaryMainWindow()->doc->MasterNames[masterPageName]);
 	ScCore->primaryMainWindow()->doc->setMasterPageMode(oldMode);
 //	Py_INCREF(Py_None);
 //	return Py_None;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp Wed Jan 18 21:51:08 2012
@@ -83,7 +83,7 @@
 		PyErr_SetString(PyExc_IndexError, QObject::tr("Page number out of range.","python error").toLocal8Bit().constData());
 		return NULL;
 	}
-	ScCore->primaryMainWindow()->DeletePage2(e);
+	ScCore->primaryMainWindow()->deletePage2(e);
 // 	Py_INCREF(Py_None);
 // 	return Py_None;
 	Py_RETURN_NONE;

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Jan 18 21:51:08 2012
@@ -5506,10 +5506,7 @@
 	else
 		doc->addPageToSection(wo+1, where, 1);
 	doc->changed();
-	if (outlinePalette->isVisible())
-		outlinePalette->BuildTree();
-	pagePalette->rebuildPages();
-	view->DrawNew();
+	updateGUIAfterPagesChanged();
 }
 
 /** Erzeugt eine neue Seite */
@@ -5633,11 +5630,8 @@
 	//Use wo, the dialog currently returns a page Index +1 due to old numbering scheme, function now does the -1 as required
 	doc->changed();
 	doc->addPageToSection(wo, where, numPages);
-	pagePalette->rebuildPages();
-	view->reformPages(mov);
-	view->DrawNew();
-	if (outlinePalette->isVisible())
-		outlinePalette->BuildTree();
+	doc->reformPages();
+	updateGUIAfterPagesChanged();
 
 	undoManager->setUndoEnabled(true);
 
@@ -6733,28 +6727,28 @@
 }
 
 //CB-->Doc partly
-void ScribusMainWindow::DeletePage2(int pg)
+void ScribusMainWindow::deletePage2(int pg)
 {
 	if (HaveDoc && doc->appMode == modeEditClip)
 		view->requestMode(submodeEndNodeEdit);
 	view->Deselect(true);
 	if (doc->Pages->count() == 1)
 		return;
-	DeletePage(pg+1, pg+1);
-}
-
-void ScribusMainWindow::DeletePage()
+	deletePage(pg+1, pg+1);
+}
+
+void ScribusMainWindow::deletePage()
 {
 	if (HaveDoc && doc->appMode == modeEditClip)
 		view->requestMode(submodeEndNodeEdit);
 	view->Deselect(true);
 	DelPages *dia = new DelPages(this, doc->currentPage()->pageNr()+1, doc->Pages->count());
 	if (dia->exec())
-		DeletePage(dia->getFromPage(), dia->getToPage());
+		deletePage(dia->getFromPage(), dia->getToPage());
 	delete dia;
 }
 
-void ScribusMainWindow::DeletePage(int from, int to)
+void ScribusMainWindow::deletePage(int from, int to)
 {
 	UndoTransaction* activeTransaction = NULL;
 	assert( from > 0 );
@@ -6822,14 +6816,11 @@
 			doc->removePageFromSection(a);
 	}
 	undoManager->setUndoEnabled(false); // ugly hack to disable object moving when undoing page deletion
-	view->reformPages();
+	view->reformPagesView();
 	undoManager->setUndoEnabled(true); // ugly hack continues
 	view->GotoPage(qMin(doc->Pages->count()-1, oldPg));
-	view->DrawNew();
-	if (outlinePalette->isVisible())
-		outlinePalette->BuildTree();
+	updateGUIAfterPagesChanged();
 	doc->rebuildMasterNames();
-	pagePalette->rebuildPages();
 	pagePalette->rebuildMasters();
 	if (activeTransaction)
 	{
@@ -6839,7 +6830,7 @@
 	}
 }
 
-void ScribusMainWindow::MovePage()
+void ScribusMainWindow::movePage()
 {
 	if (HaveDoc && doc->appMode == modeEditClip)
 		view->requestMode(submodeEndNodeEdit);
@@ -6853,17 +6844,13 @@
 		if (from != wo || (wie == 2 && to != signed(doc->Pages->count()) ) )
 		{
 			doc->movePage(from-1, to, wo-1, wie);
-			view->reformPages();
-			view->DrawNew();
-			pagePalette->rebuildPages();
-			if (outlinePalette->isVisible())
-				outlinePalette->BuildTree();
+			updateGUIAfterPagesChanged();
 		}
 	}
 	delete dia;
 }
 
-void ScribusMainWindow::CopyPage()
+void ScribusMainWindow::copyPage()
 {
 	if (HaveDoc && doc->appMode == modeEditClip)
 		view->requestMode(submodeEndNodeEdit);
@@ -6876,8 +6863,7 @@
 		int wo = dia->getWherePage();
 		doc->copyPage(pageNumberToCopy, wo, whereToInsert, copyCount);
 		view->Deselect(true);
-		view->DrawNew();
-		pagePalette->rebuildPages();
+		updateGUIAfterPagesChanged();
 		slotDocCh();
 	}
 	delete dia;
@@ -8497,7 +8483,7 @@
 			storedViewScale = view->scale();
 			MasterPagesPalette *dia = new MasterPagesPalette(this, doc, view, temp);
 			//connect(dia, SIGNAL(createNew(int)), this, SLOT(slotNewMasterPage(int)));
-			connect(dia, SIGNAL(removePage(int )), this, SLOT(DeletePage2(int )));
+			connect(dia, SIGNAL(removePage(int )), this, SLOT(deletePage2(int )));
 			//connect(dia, SIGNAL(loadPage(QString, int, bool)), this, SLOT(loadPage(QString, int, bool)));
 			connect(dia, SIGNAL(finished()), this, SLOT(manageMasterPagesEnd()));
 			scrActions["pageInsert"]->setEnabled(false);
@@ -8753,7 +8739,7 @@
 		uint id = static_cast<uint>(duo->getUId());
 		undoManager->replaceObject(doc->Pages->at(pagenr - 1)->getUId(), duo);
 		state->set("DUMMY_ID", id);
-		DeletePage(pagenr, pagenr);
+		deletePage(pagenr, pagenr);
 	}
 	if (!pageName.isEmpty() && !oldPageMode)
 	{
@@ -8812,7 +8798,7 @@
 		if (HaveDoc && doc->appMode == modeEditClip)
 			view->requestMode(submodeEndNodeEdit);
 		view->Deselect(true);
-		DeletePage(delFrom, delTo);
+		deletePage(delFrom, delTo);
 	}
 	else
 	{
@@ -10052,6 +10038,14 @@
 	scrMenuMgr->setMenuEnabled("InsertLigature", enabled);
 }
 
+void ScribusMainWindow::updateGUIAfterPagesChanged()
+{
+	view->DrawNew();
+	pagePalette->rebuildPages();
+	if (outlinePalette->isVisible())
+		outlinePalette->BuildTree();
+}
+
 void ScribusMainWindow::updateTableMenuActions()
 {
 	// Determine state.

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Wed Jan 18 21:51:08 2012
@@ -370,17 +370,17 @@
 	void slotNewPage(int w, const QString& masterPageName=QString::null, bool mov = true);
 	void duplicateToMasterPage();
 	/** \brief Loescht die aktuelle Seite */
-	void DeletePage();
+	void deletePage();
 	/**
 	 * \brief Delete pages
 	 * @param from First page to delete
 	 * @param to Last page to delete
 	 */
-	void DeletePage(int from, int to);
-	void DeletePage2(int pg);
+	void deletePage(int from, int to);
+	void deletePage2(int pg);
 	/** \brief Verschiebt Seiten */
-	void MovePage();
-	void CopyPage();
+	void movePage();
+	void copyPage();
 	void changePageMargins();
 	/*!
 	\author Craig Bradney
@@ -511,7 +511,8 @@
 	void enableTextActions(QMap<QString, QPointer<ScrAction> > *actionMap, bool enabled, const QString& fontName=QString::null);
 	//! \brief allow SE to get the SM for edit stlyes
 	StyleManager *styleMgr() const {return styleManager;};
-
+	//! \brief drawnew, call palettes to update for new page layout
+	void updateGUIAfterPagesChanged();
 	/**
 	 * Enables/disables the actions in the "Table" menu.
 	 *

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jan 18 21:51:08 2012
@@ -1735,8 +1735,10 @@
 		}
 		else if (ss->contains("OLD_MASTERPAGE"))
 			restoreMasterPageApplying(ss, isUndo);
-		else if (ss->contains("COPY_PAGE"))
-			restorePageCopy(ss, isUndo);
+		else if (ss->contains("PAGE_COPY"))
+			restoreCopyPage(ss, isUndo);
+		else if (ss->contains("PAGE_MOVE"))
+			restoreMovePage(ss, isUndo);
 		else if (ss->contains("PAGE_CHANGEPROPS"))
 		{
 			if (isUndo)
@@ -2209,38 +2211,89 @@
 	setCurrentPage(Pages->at(pageNumber!=0?0:1));
 	ScPage* page = Pages->takeAt(pageNumber);
 	delete page;
+	reformPages();
 	changed();
 }
 
 
-void ScribusDoc::movePage(const int from, const int to, const int ziel, const int art)
-{
-	QList<ScPage*> Buf;
-	int zz = ziel;
-	Buf.clear();
-	for (int a = from; a < to; ++a)
-	{
-		Buf.append(Pages->takeAt(from));
-		if (a <= zz)
-			--zz;
-	}
-	int bufCount=Buf.count();
-	switch (art)
-	{
-		case 0:
-			for (int b = 0; b < bufCount; ++b)
-				Pages->insert(zz++, Buf.at(b));
+void ScribusDoc::movePage(const int fromPage, const int toPage, const int dest, const int position)
+{
+	QList<ScPage*> pageList;
+	int numPages = dest;
+	pageList.clear();
+	for (int i = fromPage; i < toPage; ++i)
+	{
+		pageList.append(Pages->takeAt(fromPage));
+		if (i <= numPages)
+			--numPages;
+	}
+	int pageListCount=pageList.count();
+	switch (position)
+	{
+		case 0: //Before Page
+			for (int j = 0; j < pageListCount; ++j)
+				Pages->insert(numPages++, pageList.at(j));
 			break;
-		case 1:
-			for (int b = 0; b < bufCount; ++b)
-				Pages->insert(++zz, Buf.at(b));
+		case 1: //After Page
+			for (int j = 0; j < pageListCount; ++j)
+				Pages->insert(++numPages, pageList.at(j));
 			break;
-		case 2:
-			for (int b = 0; b < bufCount; ++b)
-				Pages->append(Buf.at(b));
+		case 2: //To End
+			for (int j = 0; j < pageListCount; ++j)
+				Pages->append(pageList.at(j));
 			break;
 	}
+
+	if (UndoManager::undoEnabled())
+	{
+		SimpleState *ss = new SimpleState(Um::MovePage, "", Um::IDocument);
+		ss->set("PAGE_MOVE", "page_move");
+		ss->set("PAGE_MOVE_FROM", fromPage);
+		ss->set("PAGE_MOVE_TO", toPage);
+		ss->set("PAGE_MOVE_DEST", dest);
+		ss->set("PAGE_MOVE_NEWPOS", position);
+		undoManager->action(this, ss, DocName, Um::IDocument);
+	}
+	reformPages();
+	if (m_View && m_ScMW)
+	{
+		m_View->reformPagesView();
+		m_ScMW->updateGUIAfterPagesChanged();
+	}
 	changed();
+}
+
+void ScribusDoc::restoreMovePage(SimpleState *state, bool isUndo)
+{
+	int fromPage = state->getInt("PAGE_MOVE_FROM");
+	int toPage = state->getInt("PAGE_MOVE_TO");
+	int position = state->getInt("PAGE_MOVE_NEWPOS");
+	int dest = state->getInt("PAGE_MOVE_DEST");
+
+	if (isUndo)
+	{
+		int newPageDest=fromPage;
+		int newPageFrom=0;
+		int newPageTo  =0;
+		int newPosition=0;
+		int pagesMoved=toPage-fromPage;
+		switch (position)
+		{
+		case 0: //Before Page
+			newPageFrom=dest-pagesMoved;
+			break;
+		case 1: //After Page
+			newPageFrom=dest-pagesMoved+1;
+			break;
+		case 2: //To End
+			newPageFrom=Pages->count()-pagesMoved;
+			break;
+		}
+		newPageTo=newPageFrom+pagesMoved;
+		movePage(newPageFrom, newPageTo, newPageDest, newPosition);
+	}
+	else
+		movePage(fromPage, toPage, dest, position);
 }
 
 
@@ -4038,7 +4091,7 @@
 }
 
 
-void ScribusDoc::restorePageCopy(SimpleState *state, bool isUndo)
+void ScribusDoc::restoreCopyPage(SimpleState *state, bool isUndo)
 {
 	int pnum = state->getInt("PAGE_NUM");
 	int extPage = state->getInt("EXISTING_PAGE");
@@ -4054,7 +4107,7 @@
 			destLocation=DocPages.count();
 		for (int i = 0; i < copyCount; ++i)
 		{
-			m_ScMW->DeletePage(destLocation, destLocation);
+			m_ScMW->deletePage(destLocation, destLocation);
 			if (whereTo == 2)
 				--destLocation;
 		}
@@ -5936,7 +5989,7 @@
 {
 	UndoTransaction copyTransaction(undoManager->beginTransaction(getUName(), Um::IDocument, Um::CopyPage, "", Um::ICreate));
 	SimpleState *ss = new SimpleState(Um::Copy, "", Um::ICreate);
-	ss->set("COPY_PAGE", "copy_page");
+	ss->set("PAGE_COPY", "copy_page");
 	ss->set("PAGE_NUM", pageNumberToCopy);
 	ss->set("EXISTING_PAGE", existingPage);
 	ss->set("WHERE_TO", whereToInsert);
@@ -6035,8 +6088,10 @@
 				destination->initialMargins.Right = from->initialMargins.Right;
 			}
 		}
+		reformPages();
 		// FIXME: stop using m_View
-		m_View->reformPages();
+		if (m_View)
+			m_View->reformPagesView();
 		if (itemBuffer.count() > 0)
 		{
 			int lcount = 0;

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Wed Jan 18 21:51:08 2012
@@ -262,12 +262,12 @@
 	void setLocationBasedPageLRMargins(uint pageIndex);
 	/**
 	 * @brief Move page(s) within the document
-	 * @param from page index
-	 * @param to page index
-	 * @param ziel target to move to (page index)
-	 * @param art Before, After or at the end
-	 */
-	void movePage(const int from, const int to, const int ziel, const int art);
+	 * @param fromPage page index
+	 * @param toPage page index
+	 * @param count target to move to (page index)
+	 * @param position Before, After or at the end
+	 */
+	void movePage(const int fromPage, const int toPage, const int dest, const int position);
 	
 	/**
 	 * @brief Copy a page (pageNumberToCopy) copyCount times, whereToInsert(before or after) the existingPage or at the end.
@@ -704,7 +704,8 @@
 	 * @brief Undo function for applying a master page
 	 */
 	void restoreMasterPageApplying(SimpleState *state, bool isUndo);
-	void restorePageCopy(SimpleState *state, bool isUndo);
+	void restoreCopyPage(SimpleState *state, bool isUndo);
+	void restoreMovePage(SimpleState *state, bool isUndo);
 	/**
 	 * @brief Undo function for grouping/ungrouping
 	 */

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Wed Jan 18 21:51:08 2012
@@ -2184,6 +2184,11 @@
 void ScribusView::reformPages(bool moveObjects)
 {
 	Doc->reformPages(moveObjects);
+	reformPagesView();
+}
+
+void ScribusView::reformPagesView()
+{
 	if (!m_ScMW->scriptIsRunning())
 		setContentsPos(qRound((Doc->currentPage()->xOffset()-10 - 0*Doc->minCanvasCoordinate.x()) * m_canvas->scale()), qRound((Doc->currentPage()->yOffset()-10 - 0*Doc->minCanvasCoordinate.y()) * m_canvas->scale()));
 	if (!Doc->isLoading())

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h (original)
+++ trunk/Scribus/scribus/scribusview.h Wed Jan 18 21:51:08 2012
@@ -177,6 +177,7 @@
 	ScPage* addPage(int nr, bool mov = true);
 
 	void reformPages(bool moveObjects = true);
+	void reformPagesView();
 	void updateLayerMenu();
 	void showMasterPage(int nr);
 	void hideMasterPage();

Modified: trunk/Scribus/scribus/ui/masterpagepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/ui/masterpagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/masterpagepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/masterpagepalette.cpp Wed Jan 18 21:51:08 2012
@@ -151,7 +151,7 @@
 
 		if (currentDoc->appMode == modeEditClip)
 			currentView->requestMode(submodeEndNodeEdit);
-		currentDoc->scMW()->DeletePage2(currentDoc->MasterNames[sMuster]);
+		currentDoc->scMW()->deletePage2(currentDoc->MasterNames[sMuster]);
 		//<<CB TODO Move back into ScribusDoc::deleteMasterPage();
 		//This must happen after the pages have been reformed (view/doc)
 		currentDoc->rebuildMasterNames();

Modified: trunk/Scribus/scribus/ui/pagepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/ui/pagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette.cpp Wed Jan 18 21:51:08 2012
@@ -625,8 +625,8 @@
 	connect(this, SIGNAL(EditTemp(QString)), m_scMW, SLOT(manageMasterPages(QString)));
 	connect(pageView, SIGNAL(UseTemp(QString, int)), m_scMW, SLOT(Apply_MasterPage(QString, int)));
 	connect(pageView, SIGNAL(NewPage(int, QString)), m_scMW, SLOT(slotNewPageP(int, QString)));
-	connect(Trash, SIGNAL(DelPage(int)), m_scMW, SLOT(DeletePage2(int)));
-	connect(pageView, SIGNAL(DelPage(int)), m_scMW, SLOT(DeletePage2(int)));
+	connect(Trash, SIGNAL(DelPage(int)), m_scMW, SLOT(deletePage2(int)));
+	connect(pageView, SIGNAL(DelPage(int)), m_scMW, SLOT(deletePage2(int)));
 	connect(this, SIGNAL(gotoPage(int)), m_scMW, SLOT(selectPagesFromOutlines(int)));
 }
 
@@ -652,7 +652,7 @@
 		int  storedViewYCoor = currView->verticalScrollBar()->value();
 
 		currView->Doc->setMasterPageMode(true);
-		currView->Doc->scMW()->DeletePage2(currView->Doc->MasterNames[tmp]);
+		currView->Doc->scMW()->deletePage2(currView->Doc->MasterNames[tmp]);
 		//<<CB TODO Move back into ScribusDoc::deleteMasterPage();
 		//This must happen after the pages have been reformed (view/doc)
 		currView->Doc->rebuildMasterNames();

Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp (original)
+++ trunk/Scribus/scribus/undomanager.cpp Wed Jan 18 21:51:08 2012
@@ -966,6 +966,7 @@
 	UndoManager::RemoveAllPageGuides = tr("Remove page guides");
 	UndoManager::Copy               = tr("Copy");
 	UndoManager::CopyPage           = tr("Copy page");
+	UndoManager::MovePage           = tr("Move page");
 	UndoManager::ToOutlines         = tr("Convert to outlines");
 	UndoManager::LinkTextFrame		= tr("Link text frame");
 	UndoManager::UnlinkTextFrame	= tr("Unlink text frame");
@@ -1176,6 +1177,7 @@
 QString UndoManager::RemoveAllPageGuides = "";
 QString UndoManager::Copy               = "";
 QString UndoManager::CopyPage           = "";
+QString UndoManager::MovePage           = "";
 QString UndoManager::ToOutlines         = "";
 QString UndoManager::LinkTextFrame      = "";
 QString UndoManager::UnlinkTextFrame    = "";

Modified: trunk/Scribus/scribus/undomanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17213&path=/trunk/Scribus/scribus/undomanager.h
==============================================================================
--- trunk/Scribus/scribus/undomanager.h (original)
+++ trunk/Scribus/scribus/undomanager.h Wed Jan 18 21:51:08 2012
@@ -592,6 +592,7 @@
 	static QString AdjustFrameToImage;
 	static QString Copy;
 	static QString CopyPage;
+	static QString MovePage;
 	static QString ToOutlines;
 	static QString LinkTextFrame;
 	static QString UnlinkTextFrame;




More information about the scribus-commit mailing list