r16492 by craig - Add undo for layer flow settings change, add missing unlink definition for pageitem
scribus-commit
scribus-commit at lists.scribus.net
Thu Mar 24 16:55:52 CET 2011
Author: craig
Date: Thu Mar 24 15:55:52 2011
New Revision: 16492
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16492
Log:
Add undo for layer flow settings change, add missing unlink definition for pageitem
Modified:
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/undomanager.cpp
trunk/Scribus/scribus/undomanager.h
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16492&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Thu Mar 24 15:55:52 2011
@@ -1220,6 +1220,7 @@
void restoreShapeContour(UndoState *state, bool isUndo);
void restoreImageEffects(UndoState *state, bool isUndo);
void restoreLinkTextFrame(UndoState *state, bool isUndo);
+ void restoreUnlinkTextFrame(UndoState *state, bool isUndo);
/*@}*/
/**
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16492&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Mar 24 15:55:52 2011
@@ -1463,6 +1463,12 @@
{
bool print = ss->getBool("PRINT");
setLayerPrintable(ss->getInt("ACTIVE"), isUndo ? !print : print);
+ layersUndo=true;
+ }
+ else if (ss->contains("FLOW_LAYER"))
+ {
+ bool flow = ss->getBool("FLOW");
+ setLayerFlow(ss->getInt("ACTIVE"), isUndo ? !flow : flow);
layersUndo=true;
}
else if (ss->contains("ADD_LAYER"))
@@ -2207,7 +2213,7 @@
ss->set("PRINT_LAYER", "print_layer");
ss->set("ACTIVE", (*it).ID);
ss->set("PRINT", isPrintable);
- undoManager->action(this, ss, DocName, Um::IDocument);
+ undoManager->action(this, ss, it->Name, Um::IDocument);
}
found=true;
break;
@@ -2307,7 +2313,18 @@
{
if (it->ID == layerID)
{
+ bool oldFlow = it->flowControl;
it->flowControl = flow;
+
+ if (oldFlow!=flow && UndoManager::undoEnabled())
+ {
+ SimpleState *ss = new SimpleState(flow ? Um::FlowLayer : Um::DisableFlowLayer,"", Um::ITextFrame);
+ ss->set("FLOW_LAYER", "flow_layer");
+ ss->set("ACTIVE", (*it).ID);
+ ss->set("FLOW", flow);
+ undoManager->action(this, ss, it->Name, Um::IDocument);
+ }
+
found=true;
break;
}
Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16492&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp (original)
+++ trunk/Scribus/scribus/undomanager.cpp Thu Mar 24 15:55:52 2011
@@ -941,6 +941,8 @@
UndoManager::PrintLayer = tr("Enable printing of layer");
UndoManager::DoNotPrintLayer = tr("Disable printing of layer");
UndoManager::SetLayerName = tr("Change name of the layer");
+ UndoManager::FlowLayer = tr("Enable text flow around for lower layers");
+ UndoManager::DisableFlowLayer = tr("Disable text flow around for lower layers");
UndoManager::GetImage = tr("Get image");
UndoManager::ChangeFormula = tr("Change formula");
UndoManager::MultipleDuplicate = tr("Multiple duplicate");
@@ -1145,6 +1147,8 @@
QString UndoManager::PrintLayer = "";
QString UndoManager::DoNotPrintLayer = "";
QString UndoManager::SetLayerName = "";
+QString UndoManager::FlowLayer = "";
+QString UndoManager::DisableFlowLayer = "";
QString UndoManager::GetImage = "";
QString UndoManager::ChangeFormula = "";
QString UndoManager::MultipleDuplicate = "";
Modified: trunk/Scribus/scribus/undomanager.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16492&path=/trunk/Scribus/scribus/undomanager.h
==============================================================================
--- trunk/Scribus/scribus/undomanager.h (original)
+++ trunk/Scribus/scribus/undomanager.h Thu Mar 24 15:55:52 2011
@@ -569,6 +569,8 @@
static QString PrintLayer;
static QString DoNotPrintLayer;
static QString SetLayerName;
+ static QString FlowLayer;
+ static QString DisableFlowLayer;
static QString GetImage;
static QString ChangeFormula;
static QString MultipleDuplicate;
More information about the scribus-commit
mailing list