r18007 by craig - Complete TODO: Remove pageitem Frame member, replace with readonly version and remove all setter code
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 29 21:15:10 UTC 2012
Author: craig
Date: Sat Dec 29 21:15:10 2012
New Revision: 18007
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18007
Log:
Complete TODO: Remove pageitem Frame member, replace with readonly version and remove all setter code
Modified:
trunk/Scribus/scribus/loadsaveplugin.h
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_imageframe.cpp
trunk/Scribus/scribus/pageitem_pathtext.cpp
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
trunk/Scribus/scribus/sampleitem.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/ui/paintmanager.cpp
Modified: trunk/Scribus/scribus/loadsaveplugin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/loadsaveplugin.h
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.h (original)
+++ trunk/Scribus/scribus/loadsaveplugin.h Sat Dec 29 21:15:10 2012
@@ -18,7 +18,6 @@
class FileFormat;
//TODO REmove includes one day
-//class ScribusDoc;
class ScribusView;
#include "scfonts.h"
#include "scribusdoc.h"
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sat Dec 29 21:15:10 2012
@@ -149,7 +149,6 @@
textPathFlipped(other.textPathFlipped),
ClipEdited(other.ClipEdited),
FrameType(other.FrameType),
- Frame(other.Frame),
OwnPage(other.OwnPage),
oldOwnPage(other.oldOwnPage),
pixm(other.pixm),
@@ -180,6 +179,7 @@
NextBox(NULL), // otherwise other.NextBox->BackBox would be inconsistent
firstChar(0), // since this box is unlinked now
MaxChars(0), // since the layout is invalid now
+ m_sampleItem(false),
inPdfArticle(other.inPdfArticle),
isRaster(other.isRaster),
OldB(other.OldB),
@@ -486,6 +486,7 @@
RExtra = m_Doc->itemToolPrefs().textDistances.Right;
firstChar = 0;
MaxChars = 0;
+ m_sampleItem = false;
Pfile = "";
pixm = ScImage();
pixm.imgInfo.lowResType = m_Doc->itemToolPrefs().imageLowResType;
@@ -501,11 +502,6 @@
BBoxX = 0;
BBoxH = 0;
RadRect = 0;
- if ((m_ItemType == TextFrame) || (m_ItemType == ImageFrame) || (m_ItemType == PathText))
- // TODO: Frame should become a read-only calculated property
- Frame = true;
- else
- Frame = false;
switch (m_ItemType)
{
case Polygon:
@@ -1990,7 +1986,7 @@
double scpInv = 0;
if (!isGroup())
{
- if ((Frame) && (m_Doc->guidesPrefs().framesShown) && ((itemType() == ImageFrame) || (itemType() == LatexFrame) || (itemType() == OSGFrame) || (itemType() == PathText)) && (no_stroke))
+ if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown) && ((itemType() == ImageFrame) || (itemType() == LatexFrame) || (itemType() == OSGFrame) || (itemType() == PathText)) && (no_stroke))
{
p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((isBookmark) || (m_isAnnotation))
@@ -6925,7 +6921,6 @@
if (isUndo)
{
this->ClipEdited=is->getBool("PATH_OP_OLD_CLIPEDITED");
- this->Frame=is->getBool("PATH_OP_OLD_FRAME");
this->FrameType=is->getInt("PATH_OP_OLD_FRAMETYPE");
this->OldB2=is->getDouble("PATH_OP_OLD_OLDB2");
this->OldH2=is->getDouble("PATH_OP_OLD_OLDH2");
@@ -6936,7 +6931,6 @@
else
{
this->ClipEdited=is->getBool("PATH_OP_NEW_CLIPEDITED");
- this->Frame=is->getBool("PATH_OP_NEW_FRAME");
this->FrameType=is->getInt("PATH_OP_NEW_FRAMETYPE");
this->OldB2=is->getDouble("PATH_OP_NEW_OLDB2");
this->OldH2=is->getDouble("PATH_OP_NEW_OLDH2");
@@ -6991,7 +6985,6 @@
}
PoLine.resize(PoLine.size()-pts);
Segments.clear();
- Frame = is->getBool("FRAME");
FrameType = is->getInt("FRAMETYPE");
ClipEdited = is->getBool("CLIPEDITED");
doc()->AdjustItemSize(this);
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Sat Dec 29 21:15:10 2012
@@ -472,8 +472,7 @@
int FrameType;
/** Internal unique Item-Number, used for the undo system */
uint uniqueNr;
- /** Hat Element Rahmen? FIXME: still used? - in DrawObject_Post */
- bool Frame;
+ bool drawFrame() { return ((m_ItemType == TextFrame && !m_sampleItem) || (m_ItemType == ImageFrame) || (m_ItemType == PathText)); }
/** page this element belongs to */
int OwnPage;
/** @brief Old page number tracked for the move undo action */
@@ -559,7 +558,9 @@
PageItem *NextBox;
uint firstChar;
uint MaxChars;
+ bool m_sampleItem; //Used to not draw the frame for sample items
public:
+ void setSampleItem(bool b) {m_sampleItem=b;}
bool inPdfArticle;
bool isRaster;
double OldB;
Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Sat Dec 29 21:15:10 2012
@@ -82,7 +82,7 @@
p->save();
if (Pfile.isEmpty())
{
- if ((Frame) && (m_Doc->guidesPrefs().framesShown))
+ if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown))
{
p->setPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->drawLine(FPoint(0, 0), FPoint(Width, Height));
@@ -94,7 +94,7 @@
//If we are missing our image, draw a red cross in the frame
if ((!PicArt) || (!PictureIsAvailable))
{
- if ((Frame) && (m_Doc->guidesPrefs().framesShown))
+ if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown))
{
p->setBrush(Qt::white);
QString htmlText = "";
Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp Sat Dec 29 21:15:10 2012
@@ -66,7 +66,6 @@
DrawObj(painter, rd);
painter->end();
delete painter;
- Frame = true;
updatePolyClip();
}
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Sat Dec 29 21:15:10 2012
@@ -3876,7 +3876,7 @@
if ((!isEmbedded) && (!m_Doc->RePos))
{
double scpInv = 0.0;
- if ((Frame) && (m_Doc->guidesPrefs().framesShown) && (no_stroke))
+ if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown) && (no_stroke))
{
p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((isBookmark) || (m_isAnnotation))
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Sat Dec 29 21:15:10 2012
@@ -569,7 +569,6 @@
currItem->ClipEdited = true;
currItem->FrameType = 3;
currItem->updatePolyClip();
- currItem->Frame = true;
}
if (Buffer->GrType != 0)
{
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sat Dec 29 21:15:10 2012
@@ -2020,10 +2020,7 @@
}
if (newItem->asPathText())
- {
newItem->updatePolyClip();
- newItem->Frame = true;
- }
if (newItem->asImageFrame() || newItem->asLatexFrame())
{
if (!newItem->Pfile.isEmpty())
@@ -2931,10 +2928,7 @@
}
if (currItem->asPathText())
- {
currItem->updatePolyClip();
- currItem->Frame = true;
- }
currItem->GrType = attrs.valueAsInt("GRTYP", 0);
QString GrColor;
QString GrColor2;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Sat Dec 29 21:15:10 2012
@@ -1921,10 +1921,7 @@
if (currItem->asImageFrame())
currItem->AdjustPictScale();
if (currItem->asPathText())
- {
currItem->updatePolyClip();
- currItem->Frame = true;
- }
currItem->GrType = obj->attribute("GRTYP", "0").toInt();
QString GrColor;
QString GrColor2;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sat Dec 29 21:15:10 2012
@@ -3899,10 +3899,7 @@
}
if (newItem->asPathText())
- {
newItem->updatePolyClip();
- newItem->Frame = true;
- }
#ifdef HAVE_OSG
if (newItem->asImageFrame() || newItem->asLatexFrame() || newItem->asOSGFrame())
#else
@@ -4918,10 +4915,7 @@
}
if (currItem->asPathText())
- {
currItem->updatePolyClip();
- currItem->Frame = true;
- }
currItem->GrType = attrs.valueAsInt("GRTYP", 0);
QString GrColor;
QString GrColor2;
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp Sat Dec 29 21:15:10 2012
@@ -541,7 +541,6 @@
outputPath.fromQPainterPath(path);
PageItem *currItem = origPageItem[a];
currItem->PoLine = outputPath;
- currItem->Frame = false;
currItem->ClipEdited = true;
currItem->FrameType = 3;
double oW = currItem->width();
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp Sat Dec 29 21:15:10 2012
@@ -249,7 +249,6 @@
else
{
patternItem->PoLine = originalPath;
- patternItem->Frame = false;
patternItem->ClipEdited = true;
patternItem->FrameType = 3;
patternItem->setXYPos(originalXPos, originalYPos);
@@ -273,7 +272,6 @@
{
PageItem* bxi = patternItemG[bx];
bxi->PoLine = originalPathG[bx];
- bxi->Frame = false;
bxi->ClipEdited = true;
bxi->FrameType = 3;
bxi->setXYPos(originalXPosG[bx], originalYPosG[bx], true);
@@ -322,7 +320,6 @@
QTransform mm2;
mm2.rotate(-originalRotG[bx]);
bxi->PoLine.map(mm2);
- bxi->Frame = false;
bxi->ClipEdited = true;
bxi->FrameType = 3;
bxi->setXYPos(pathItem->xPos()+deltaX, pathItem->yPos()+deltaY, true);
@@ -360,7 +357,6 @@
if (effectType == -1)
{
patternItem->PoLine = originalPath;
- patternItem->Frame = false;
patternItem->ClipEdited = true;
patternItem->FrameType = 3;
patternItem->setXYPos(originalXPos, originalYPos);
@@ -377,7 +373,6 @@
patternpwd2 = FPointArray2Piecewise(originalPath, true);
setUpEffect(originaldpwd2, patternpwd2, effectType, offset / currDoc->unitRatio(), offsetY / currDoc->unitRatio(), gap / currDoc->unitRatio(), rotate);
patternItem->PoLine = doEffect_pwd2(patternpwd2);
- patternItem->Frame = false;
patternItem->ClipEdited = true;
patternItem->FrameType = 3;
patternItem->setXYPos(pathItem->xPos(), pathItem->yPos());
Modified: trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp Sat Dec 29 21:15:10 2012
@@ -126,7 +126,6 @@
FPointArray points;
points.fromQPainterPath(path);
currItem->PoLine = points;
- currItem->Frame = false;
currItem->ClipEdited = true;
currItem->FrameType = 3;
double oW = currItem->width();
Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp Sat Dec 29 21:15:10 2012
@@ -136,7 +136,6 @@
trans = new UndoTransaction(UndoManager::instance()->beginTransaction(Um::BezierCurve,Um::ILine,Um::ConnectPath,"",Um::ILine));
Item1->PoLine = computePath(pointOne, pointTwo, mode, originalPath1, originalPath2);
- Item1->Frame = false;
Item1->ClipEdited = true;
Item1->FrameType = 3;
currDoc->AdjustItemSize(Item1);
@@ -168,7 +167,6 @@
else
{
Item1->PoLine = originalPath1.copy();
- Item1->Frame = false;
Item1->ClipEdited = true;
Item1->FrameType = 3;
Item1->setXYPos(originalXPos, originalYPos);
@@ -189,7 +187,6 @@
if (effectType == -1)
{
Item1->PoLine = originalPath1.copy();
- Item1->Frame = false;
Item1->ClipEdited = true;
Item1->FrameType = 3;
Item1->setXYPos(originalXPos, originalYPos);
@@ -199,7 +196,6 @@
{
Item1->setXYPos(originalXPos, originalYPos);
Item1->PoLine = computePath(pointOne, pointTwo, mode, originalPath1, originalPath2);
- Item1->Frame = false;
Item1->ClipEdited = true;
Item1->FrameType = 3;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp Sat Dec 29 21:15:10 2012
@@ -161,7 +161,6 @@
FPointArray points;
points.fromQPainterPath(result);
Item2->PoLine = points;
- Item2->Frame = false;
Item2->ClipEdited = true;
Item2->FrameType = 3;
currDoc->AdjustItemSize(Item2);
Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp Sat Dec 29 21:15:10 2012
@@ -230,7 +230,6 @@
{
state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
state->set("PATH_OPERATION", "path_operation");
- state->set("PATH_OP_OLD_FRAME", currItem->Frame);
state->set("PATH_OP_OLD_CLIPEDITED", currItem->ClipEdited);
state->set("PATH_OP_OLD_FRAMETYPE", currItem->FrameType);
state->set("PATH_OP_OLD_OLDB2", currItem->OldB2);
@@ -242,7 +241,6 @@
//>>#9046
currItem->PoLine = points;
- currItem->Frame = false;
currItem->ClipEdited = true;
currItem->FrameType = 3;
currDoc->AdjustItemSize(currItem);
@@ -283,7 +281,6 @@
{
state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
state->set("PATH_OPERATION", "path_operation");
- state->set("PATH_OP_OLD_FRAME", Item1->Frame);
state->set("PATH_OP_OLD_CLIPEDITED", Item1->ClipEdited);
state->set("PATH_OP_OLD_FRAMETYPE", Item1->FrameType);
state->set("PATH_OP_OLD_OLDB2", Item1->OldB2);
@@ -294,7 +291,6 @@
}
//>>#9046
Item1->PoLine = points;
- Item1->Frame = false;
Item1->ClipEdited = true;
Item1->FrameType = 3;
currDoc->AdjustItemSize(Item1);
@@ -326,7 +322,6 @@
{
state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
state->set("PATH_OPERATION", "path_operation");
- state->set("PATH_OP_OLD_FRAME", Item2->Frame);
state->set("PATH_OP_OLD_CLIPEDITED", Item2->ClipEdited);
state->set("PATH_OP_OLD_FRAMETYPE", Item2->FrameType);
state->set("PATH_OP_OLD_OLDB2", Item2->OldB2);
@@ -339,7 +334,6 @@
Item2->setXYPos(i1x, i1y);
Item2->setRotation(0.0);
Item2->PoLine = points;
- Item2->Frame = false;
Item2->ClipEdited = true;
Item2->FrameType = 3;
currDoc->AdjustItemSize(Item2);
@@ -377,7 +371,6 @@
newItem->setSelected(false);
points.fromQPainterPath(path);
newItem->PoLine = points;
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
currDoc->AdjustItemSize(newItem);
Modified: trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp Sat Dec 29 21:15:10 2012
@@ -199,7 +199,6 @@
FPointArray points;
points.fromQPainterPath(result);
newItem->PoLine = points;
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
currDoc->AdjustItemSize(newItem);
@@ -253,7 +252,6 @@
FPointArray points;
points.fromQPainterPath(result);
newItem->PoLine = points;
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
currDoc->AdjustItemSize(newItem);
@@ -291,7 +289,6 @@
newItem->setFillTransparency(newItem->lineTransparency());
newItem->setFillBlendmode(newItem->lineBlendmode());
newItem->PoLine = arrow;
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
currDoc->AdjustItemSize(newItem);
@@ -331,7 +328,6 @@
newItem->setFillTransparency(newItem->lineTransparency());
newItem->setFillBlendmode(newItem->lineBlendmode());
newItem->PoLine = arrow;
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
currDoc->AdjustItemSize(newItem);
Modified: trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp Sat Dec 29 21:15:10 2012
@@ -203,7 +203,6 @@
}
}
currItem->PoLine = points;
- currItem->Frame = false;
currItem->ClipEdited = true;
currItem->FrameType = 3;
currDoc->AdjustItemSize(currItem);
Modified: trunk/Scribus/scribus/sampleitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/sampleitem.cpp
==============================================================================
--- trunk/Scribus/scribus/sampleitem.cpp (original)
+++ trunk/Scribus/scribus/sampleitem.cpp Sat Dec 29 21:15:10 2012
@@ -299,7 +299,7 @@
previewItem->setFillColor("__whiteforpreviewbg__");
previewItem->setFillShade(bgShade);
previewItem->SetRectFrame();
- previewItem->Frame = false;
+ previewItem->setSampleItem(true);
previewItem->DrawObj(painter, QRect());
painter->end();
delete(painter);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Dec 29 21:15:10 2012
@@ -5755,16 +5755,11 @@
if (m_hasGUI)
{
QFileInfo fi(pageItem->Pfile);
- //#9845, why are we tracking dir changes when we are tracking the file itself
- //ScCore->fileWatcher->addDir(fi.absolutePath());
ScCore->fileWatcher->addFile(pageItem->Pfile);
}
}
if (!isLoading())
{
- //TODO: Previously commented out.. unsure why, remove later
- //emit UpdtObj(PageNr, ItNr);
- //CB: probably because we are therefore not always refreshing the view when an image changes...
pageItem->update();
changed();
}
@@ -6326,11 +6321,9 @@
{
case PageItem::ImageFrame:
newItem->convertTo(PageItem::ImageFrame);
- newItem->Frame = true;
break;
case PageItem::TextFrame:
newItem->convertTo(PageItem::TextFrame);
- newItem->Frame = true;
if (oldItem->itemType()==PageItem::PathText)
{
uint newPolyItemNo = itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), CommonStrings::None, currItem->lineColor(), true);
@@ -6352,7 +6345,6 @@
break; */
case PageItem::Polygon:
newItem->convertTo(PageItem::Polygon);
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
if(oldItem->itemType()==PageItem::PolyLine)
@@ -6372,7 +6364,6 @@
if(oldItem->itemType()==PageItem::Line)
{
QTransform ma;
- newItem->Frame = false;
newItem->FrameType = 3;
ma.rotate(newItem->rotation());
newItem->PoLine.resize(0);
@@ -6388,7 +6379,6 @@
case PageItem::PathText:
{
newItem->convertTo(PageItem::PathText);
- newItem->Frame = true;
newItem->ClipEdited = true;
newItem->PoLine = secondaryItem->PoLine.copy();
newItem->setLineWidth(secondaryItem->lineWidth());
@@ -15266,10 +15256,8 @@
if (currItem->isGroup())
return;
m_Selection->delaySignalsOn();
- bool currFrame = currItem->Frame;
bool currClipEdited = currItem->ClipEdited;
int currFrameType = currItem->FrameType;
- currItem->Frame = false;
currItem->ClipEdited = true;
currItem->FrameType = 3;
for (uint a = 1; a < docSelectionCount; ++a)
@@ -15302,7 +15290,6 @@
ScItemState< QPair<QList<PageItem*> , QList<QTransform> > > *is = new ScItemState< QPair<QList<PageItem*> , QList<QTransform> > >(Um::UniteItem, "", Um::IGroup);
is->setItem(qMakePair(toDel,transform));
is->set("UNITEITEM", "uniteitem");
- is->set("FRAME",currFrame);
is->set("FRAMETYPE",currFrameType);
is->set("CLIPEDITED",currClipEdited);
undoManager->action(currItem, is);
@@ -15353,7 +15340,6 @@
itemsList.append(currItemNr);
Items->insert(currItemNr, bb);
bb->convertTo(PageItem::Polygon);
- bb->Frame = false;
bb->FrameType = 3;
bb->PoLine.resize(0);
bb->PoLine.putPoints(0, EndInd - StartInd, currItem->PoLine, StartInd);
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sat Dec 29 21:15:10 2012
@@ -4116,7 +4116,6 @@
{
PageItem* newItem = new PageItem_Polygon(*currItem);
newItem->convertTo(PageItem::Polygon);
- newItem->Frame = false;
newItem->ClipEdited = true;
newItem->FrameType = 3;
newItem->OldB2 = newItem->width();
Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18007&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Sat Dec 29 21:15:10 2012
@@ -1324,14 +1324,9 @@
{
PageItem* ite = m_doc->Items->at(ac);
if (ite->itemType() == PageItem::PathText)
- {
- ite->Frame = true;
ite->updatePolyClip();
- }
else
- {
ite->layout();
- }
}
ScPattern pat = ScPattern();
pat.setDoc(m_doc);
More information about the scribus-commit
mailing list