r18129 by jghali - #11407: PDF checker dont activate correct layer on frame selection, backport fixes from 1.5.0svn

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 7 22:29:09 UTC 2013


Author: jghali
Date: Thu Feb  7 22:29:08 2013
New Revision: 18129

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18129
Log:
#11407: PDF checker dont activate correct layer on frame selection, backport fixes from 1.5.0svn

Modified:
    branches/Version14x/Scribus/scribus/checkDocument.cpp
    branches/Version14x/Scribus/scribus/outlinepalette.cpp
    branches/Version14x/Scribus/scribus/scribus.cpp

Modified: branches/Version14x/Scribus/scribus/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18129&path=/branches/Version14x/Scribus/scribus/checkDocument.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/checkDocument.cpp (original)
+++ branches/Version14x/Scribus/scribus/checkDocument.cpp Thu Feb  7 22:29:08 2013
@@ -201,6 +201,8 @@
 		if (itemMap[ite].isNull())
 			return;
 		ScCore->primaryMainWindow()->closeActiveWindowMasterPageEditor();
+		m_Doc->setActiveLayer(itemMap[ite]->LayerNr);
+		ScCore->primaryMainWindow()->changeLayer(m_Doc->activeLayer());
 		emit selectElement(itemMap[ite]->OwnPage, itemMap[ite]->ItemNr);
 		return;
 	}
@@ -232,6 +234,8 @@
 			return;
 		if (!m_Doc->masterPageMode())
 			emit selectMasterPage(masterPageItemMap[ite]->OnMasterPage);
+		m_Doc->setActiveLayer(masterPageItemMap[ite]->LayerNr);
+		ScCore->primaryMainWindow()->changeLayer(m_Doc->activeLayer());
 		emit selectElement(-1, masterPageItemMap[ite]->ItemNr);
 		return;
 	}

Modified: branches/Version14x/Scribus/scribus/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18129&path=/branches/Version14x/Scribus/scribus/outlinepalette.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/outlinepalette.cpp (original)
+++ branches/Version14x/Scribus/scribus/outlinepalette.cpp Thu Feb  7 22:29:08 2013
@@ -601,6 +601,11 @@
 		case 1:
 			if (!currDoc->masterPageMode())
 				emit selectMasterPage(item->PageItemObject->OnMasterPage);
+			if (currDoc->activeLayer() != item->PageItemObject->LayerNr)
+			{
+				currDoc->setActiveLayer(item->PageItemObject->LayerNr);
+				m_MainWindow->changeLayer(currDoc->activeLayer());
+			}
 			if (item->PageItemObject->Groups.count() == 0)
 				emit selectElement(-1, item->PageItemObject->ItemNr, false);
 			else
@@ -620,6 +625,11 @@
 		case 4:
 			pgItem = item->PageItemObject;
 			m_MainWindow->closeActiveWindowMasterPageEditor();
+			if (currDoc->activeLayer() != pgItem->LayerNr)
+			{
+				currDoc->setActiveLayer(pgItem->LayerNr);
+				m_MainWindow->changeLayer(currDoc->activeLayer());
+			}
 			if (pgItem->Groups.count() == 0)
 				emit selectElement(pgItem->OwnPage, pgItem->ItemNr, false);
 			else

Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18129&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Thu Feb  7 22:29:08 2013
@@ -8979,6 +8979,8 @@
 		NoFrameEdit();
 	view->Deselect(true);
 	rebuildLayersList();
+	layerPalette->rebuildList();
+	layerPalette->markActiveLayer();
 	view->updateLayerMenu();
 	view->setLayerMenuText(doc->activeLayerName());
 	view->DrawNew();




More information about the scribus-commit mailing list