Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1831 → Rev 1832

/branches/Version13x/Scribus/scribus/undomanager.h
547,6 → 547,7
static const QString PrintLayer;
static const QString DoNotPrintLayer;
static const QString SetLayerName;
static const QString GetImage;
/*@}*/
 
/**
595,6 → 596,7
static QPixmap *IUp;
static QPixmap *IDown;
static QPixmap *IPrint;
static QPixmap *IGetImage;
/*@}*/
 
protected:
/branches/Version13x/Scribus/scribus/scribusview.h
250,6 → 250,7
void FlipImageH();
void FlipImageV();
void LoadPict(QString fn, int ItNr, bool reload = false);
void loadPict(QString fn, PageItem *pageItem, bool reload = false);
void AdjustPreview(PageItem *b, bool reload = true);
void AdjustPictScale(PageItem *b, bool reload = true);
void PasteItem(struct CopyPasteBuffer *Buffer, bool loading, bool drag = false);
/branches/Version13x/Scribus/scribus/pageitem.h
798,6 → 798,7
void restorePoly(SimpleState *state, bool isUndo, bool isContour);
void restoreContourLine(SimpleState *state, bool isUndo);
void restoreLayer(SimpleState *state, bool isUndo);
void restoreGetImage(SimpleState *state, bool isUndo);
/*@}*/
 
/**
/branches/Version13x/Scribus/scribus/pageitem.cpp
3435,6 → 3435,8
}
else if (ss->contains("SEND_TO_LAYER"))
restoreLayer(ss, isUndo);
else if (ss->contains("GET_IMAGE"))
restoreGetImage(ss, isUndo);
}
}
 
3871,6 → 3873,20
ScApp->view->updateContents();
}
 
void PageItem::restoreGetImage(SimpleState *state, bool isUndo)
{
QString fn = state->get("OLD_IMAGE_PATH");
if (!isUndo)
fn = state->get("NEW_IMAGE_PATH");
if (fn == "")
{
select();
ScApp->view->ClearItem();
}
else
ScApp->view->loadPict(fn, this, false);
}
 
void PageItem::select()
{
ScApp->view->Deselect(false);
/branches/Version13x/Scribus/scribus/scribusview.cpp
10329,9 → 10329,14
 
void ScribusView::LoadPict(QString fn, int ItNr, bool reload)
{
loadPict(fn, Doc->Items.at(ItNr), reload);
}
 
void ScribusView::loadPict(QString fn, PageItem *pageItem, bool reload)
{
bool dummy;
QFileInfo fi = QFileInfo(fn);
PageItem *Item = Doc->Items.at(ItNr);
PageItem *Item = pageItem;
Item->imgInfo.valid = false;
Item->imgInfo.clipPath = "";
Item->imgInfo.PDSpathData.clear();
10350,6 → 10355,14
}
else
{
if (UndoManager::undoEnabled() && !reload)
{
SimpleState *ss = new SimpleState(Um::GetImage, fn, Um::IGetImage);
ss->set("GET_IMAGE", "get_image");
ss->set("OLD_IMAGE_PATH", Item->Pfile);
ss->set("NEW_IMAGE_PATH", fn);
undoManager->action(Item, ss);
}
double xres = qRound(img.dotsPerMeterX() * 0.0254);
double yres = qRound(img.dotsPerMeterY() * 0.0254);
Item->pixm = img.copy();
11396,3 → 11409,4
}
}
}
 
/branches/Version13x/Scribus/scribus/undomanager.cpp
809,6 → 809,7
// UndoManager::ILayerAction = new QPixmap(iconDir + "u_layer_action.png");
// UndoManager::IUp = new QPixmap(iconDir + "u_up.png");
// UndoManager::IDown = new QPixmap(iconDir + "u_down.png");
// UndoManager::IGetImage = new QPixmap(iconDir + "u_get_image.png");
}
 
const QString UndoManager::AddVGuide = tr("Add vertical guide");
914,6 → 915,7
const QString UndoManager::PrintLayer = tr("Enable printing of layer");
const QString UndoManager::DoNotPrintLayer = tr("Disable printing of layer");
const QString UndoManager::SetLayerName = tr("Change name of the layer");
const QString UndoManager::GetImage = tr("Get image");
 
/*** Icons for UndoObjects *******************************************/
QPixmap *UndoManager::IImageFrame = NULL;
956,4 → 958,5
QPixmap *UndoManager::IUp = NULL;
QPixmap *UndoManager::IDown = NULL;
QPixmap *UndoManager::IPrint = NULL;
QPixmap *UndoManager::IGetImage = NULL;