Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16496 → Rev 16497

/trunk/Scribus/scribus/undomanager.h
571,6 → 571,8
static QString SetLayerName;
static QString FlowLayer;
static QString DisableFlowLayer;
static QString SetLayerBlendMode;
static QString SetLayerTransparency;
static QString GetImage;
static QString ChangeFormula;
static QString MultipleDuplicate;
/trunk/Scribus/scribus/scribusdoc.cpp
1465,12 → 1465,26
setLayerPrintable(ss->getInt("ACTIVE"), isUndo ? !print : print);
layersUndo=true;
}
else if (ss->contains("FLOW_LAYER"))
else if (ss->contains("LAYER_FLOW"))
{
bool flow = ss->getBool("FLOW");
setLayerFlow(ss->getInt("ACTIVE"), isUndo ? !flow : flow);
layersUndo=true;
}
else if (ss->contains("LAYER_TRANSPARENCY"))
{
double old_trans = ss->getDouble("OLD_TRANS");
double new_trans = ss->getDouble("NEW_TRANS");
setLayerTransparency(ss->getInt("ACTIVE"), isUndo ? old_trans : new_trans);
layersUndo=true;
}
else if (ss->contains("LAYER_BLENDMODE"))
{
int old_blend = ss->getInt("OLD_BLENDMODE");
int new_blend = ss->getInt("NEW_BLENDMODE");
setLayerBlendMode(ss->getInt("ACTIVE"), isUndo ? old_blend : new_blend);
layersUndo=true;
}
else if (ss->contains("ADD_LAYER"))
{
if (isUndo)
2203,18 → 2217,15
{
if (it->ID == layerID)
{
bool oldPrintable = (*it).isPrintable;
it->isPrintable = isPrintable;
 
if (oldPrintable!=isPrintable && UndoManager::undoEnabled())
if (it->isPrintable!=isPrintable && UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(isPrintable ? Um::PrintLayer : Um::DoNotPrintLayer,
"", Um::IPrint);
SimpleState *ss = new SimpleState(isPrintable ? Um::PrintLayer : Um::DoNotPrintLayer, "", Um::IPrint);
ss->set("PRINT_LAYER", "print_layer");
ss->set("ACTIVE", (*it).ID);
ss->set("ACTIVE", it->ID);
ss->set("PRINT", isPrintable);
undoManager->action(this, ss, it->Name, Um::IDocument);
undoManager->action(this, ss, it->Name, Um::ILayer);
}
it->isPrintable = isPrintable;
found=true;
break;
}
2313,18 → 2324,15
{
if (it->ID == layerID)
{
bool oldFlow = it->flowControl;
it->flowControl = flow;
 
if (oldFlow!=flow && UndoManager::undoEnabled())
if (it->flowControl!=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);
SimpleState *ss = new SimpleState(flow ? Um::FlowLayer : Um::DisableFlowLayer, "", Um::ITextFrame);
ss->set("LAYER_FLOW", "layer_flow");
ss->set("ACTIVE", it->ID);
ss->set("FLOW", flow);
undoManager->action(this, ss, it->Name, Um::IDocument);
undoManager->action(this, ss, it->Name, Um::ILayer);
}
 
it->flowControl = flow;
found=true;
break;
}
2366,6 → 2374,15
{
if (it->ID == layerID)
{
if (it->transparency!=trans && UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::SetLayerTransparency, "", Um::ILayer);
ss->set("LAYER_TRANSPARENCY", "layer_transparency");
ss->set("ACTIVE", it->ID);
ss->set("OLD_TRANS", it->transparency);
ss->set("NEW_TRANS", trans);
undoManager->action(this, ss, it->Name, Um::ILayer);
}
it->transparency = trans;
found=true;
break;
2399,6 → 2416,15
{
if (it->ID == layerID)
{
if (it->blendMode!=blend && UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::SetLayerBlendMode, "", Um::ILayer);
ss->set("LAYER_BLENDMODE", "layer_blendmode");
ss->set("ACTIVE", it->ID);
ss->set("OLD_BLENDMODE", it->blendMode);
ss->set("NEW_BLENDMODE", blend);
undoManager->action(this, ss, it->Name, Um::ILayer);
}
it->blendMode = blend;
found=true;
break;
/trunk/Scribus/scribus/undomanager.cpp
943,6 → 943,8
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::SetLayerBlendMode = tr("Set layer blend mode");
UndoManager::SetLayerTransparency=tr("Set layer opacity");
UndoManager::GetImage = tr("Get image");
UndoManager::ChangeFormula = tr("Change formula");
UndoManager::MultipleDuplicate = tr("Multiple duplicate");
1114,11 → 1116,10
QString UndoManager::ImportXfig = "";
QString UndoManager::ImportWMF = "";
QString UndoManager::ScratchSpace = "";
//QString UndoManager::TextFlow = "";
QString UndoManager::ObjectFrame = "";
QString UndoManager::BoundingBox = "";
QString UndoManager::ContourLine = "";
QString UndoManager::ImageClip = "";
QString UndoManager::ImageClip = "";
QString UndoManager::NoTextFlow = "";
QString UndoManager::NoObjectFrame = "";
QString UndoManager::NoBoundingBox = "";
1149,6 → 1150,8
QString UndoManager::SetLayerName = "";
QString UndoManager::FlowLayer = "";
QString UndoManager::DisableFlowLayer = "";
QString UndoManager::SetLayerBlendMode = "";
QString UndoManager::SetLayerTransparency="";
QString UndoManager::GetImage = "";
QString UndoManager::ChangeFormula = "";
QString UndoManager::MultipleDuplicate = "";