r21750 by jghali - better fix for #14596

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 2 23:07:49 UTC 2017


Author: jghali
Date: Thu Feb  2 23:07:49 2017
New Revision: 21750

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21750
Log:
better fix for #14596

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/layers.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21750&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Thu Feb  2 23:07:49 2017
@@ -2680,7 +2680,6 @@
 	inlinePalette->setDoc(doc);
 	rebuildLayersList();
 	updateLayerMenu();
-	setLayerMenuText(doc->activeLayerName());
 	//Do not set this!, it doesn't get valid pointers unless its in EditClip mode and its not
 	//if we are switching windows #4357
 	//nodePalette->setDoc(doc, view);
@@ -2726,7 +2725,6 @@
 		outlinePalette->BuildTree();
 	rebuildLayersList();
 	updateLayerMenu();
-	setLayerMenuText(doc->activeLayerName());
 	slotChangeUnit(doc->unitIndex());
 	windowsMenuAboutToShow();
 
@@ -7389,6 +7387,13 @@
 		pm.fill(doc->Layers.layerByName(*it)->markerColor);
 		layerMenu->addItem(pm, *it);
 	}
+
+	if (layerMenu->count() != 0)
+	{
+		QString layerName = doc->activeLayerName();
+		setCurrentComboItem(layerMenu, layerName);
+	}
+
 	layerMenu->blockSignals(b);
 }
 
@@ -8174,7 +8179,6 @@
 	layerPalette->rebuildList();
 	layerPalette->markActiveLayer();
 	updateLayerMenu();
-	setLayerMenuText(doc->activeLayerName());
 	view->DrawNew();
 	bool setter = !doc->layerLocked( doc->activeLayer() );
 	scrMenuMgr->setMenuEnabled("EditPasteRecent", ((scrapbookPalette->tempBView->objectMap.count() > 0) && (setter)));

Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21750&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp	(original)
+++ trunk/Scribus/scribus/ui/layers.cpp	Thu Feb  2 23:07:49 2017
@@ -572,11 +572,12 @@
 			QPixmap pm(20,15);
 			pm.fill(neu);
 			((QToolButton*)(senderBox))->setIcon(pm);
-			m_Doc->setLayerMarker(layerID,neu);
+			m_Doc->setLayerMarker(layerID, neu);
+			m_Doc->scMW()->updateLayerMenu();
+			m_Doc->scMW()->rebuildLayersList();
 			emit LayerChanged();
 		}
 		setActiveLayer(Table->currentRow(), -1);
-		m_Doc->scMW()->changeLayer(m_Doc->activeLayer());
 	}
 }
 




More information about the scribus-commit mailing list