r17394 by fschmid - Fixed Bug 10633: "Shape limit are not displayed"
scribus-commit
scribus-commit at lists.scribus.net
Wed Mar 21 21:11:59 UTC 2012
Author: fschmid
Date: Wed Mar 21 21:11:58 2012
New Revision: 17394
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17394
Log:
Fixed Bug 10633: "Shape limit are not displayed"
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_line.cpp
trunk/Scribus/scribus/pageitem_polyline.cpp
trunk/Scribus/scribus/pageitem_spiral.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17394&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Wed Mar 21 21:11:58 2012
@@ -1430,7 +1430,9 @@
cullingArea = QRectF(QPointF(m_Doc->minCanvasCoordinate.x(), m_Doc->minCanvasCoordinate.y()),
QPointF(m_Doc->maxCanvasCoordinate.x(), m_Doc->maxCanvasCoordinate.y())).toAlignedRect();
}
-
+
+ no_fill = false;
+ no_stroke = false;
DrawObj_Pre(p);
if (m_Doc->layerOutline(LayerID))
{
@@ -1481,7 +1483,10 @@
p->setFillMode(ScPainter::Solid);
}
else
+ {
+ no_fill = true;
p->setFillMode(ScPainter::None);
+ }
if ((!patternVal.isEmpty()) && (!m_Doc->docPatterns.contains(patternVal)))
{
GrType = 0;
@@ -1520,7 +1525,10 @@
p->setFillMode(ScPainter::Solid);
}
else
+ {
+ no_fill = true;
p->setFillMode(ScPainter::None);
+ }
}
else
{
@@ -1566,7 +1574,10 @@
p->setFillMode(ScPainter::Solid);
}
else
+ {
+ no_fill = true;
p->setFillMode(ScPainter::None);
+ }
}
if ((lineColor() != CommonStrings::None) || (!patternStrokeVal.isEmpty()) || (GrTypeStroke > 0))
{
@@ -1724,7 +1735,10 @@
p->setStrokeMode(ScPainter::Solid);
}
else
+ {
+ no_stroke = true;
p->setStrokeMode(ScPainter::None);
+ }
}
else
{
@@ -1745,6 +1759,8 @@
p->setDash(DashValues, DashOffset);
p->strokePath();
}
+ else
+ no_stroke = true;
}
else
{
@@ -1873,6 +1889,16 @@
double ofx = Width - ofwh/2;
double ofy = Height - ofwh*3;
p->drawRect(ofx, ofy, ofwh, ofwh);
+ }
+ if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown)
+ {
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ if (m_Locked)
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setFillMode(ScPainter::None);
+ p->drawRect(0, 0, Width, Height);
+ no_fill = false;
+ no_stroke = false;
}
//CB disabled for now
//if (m_Doc->m_Selection->findItem(this)!=-1)
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17394&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Wed Mar 21 21:11:58 2012
@@ -1401,6 +1401,9 @@
* @sa PageItem::isTagged(), PageItem::setTagged()
*/
bool tagged;
+
+ bool no_fill;
+ bool no_stroke;
QColor fillQColor;
QColor strokeQColor;
Modified: trunk/Scribus/scribus/pageitem_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17394&path=/trunk/Scribus/scribus/pageitem_line.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.cpp (original)
+++ trunk/Scribus/scribus/pageitem_line.cpp Wed Mar 21 21:11:58 2012
@@ -88,7 +88,10 @@
p->setStrokeMode(ScPainter::Solid);
}
else
+ {
+ no_stroke = true;
p->setStrokeMode(ScPainter::None);
+ }
}
else
{
@@ -106,6 +109,8 @@
p->setStrokeMode(ScPainter::Solid);
p->drawLine(FPoint(0, 0), FPoint(Width, 0));
}
+ else
+ no_stroke = true;
}
else
{
Modified: trunk/Scribus/scribus/pageitem_polyline.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17394&path=/trunk/Scribus/scribus/pageitem_polyline.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_polyline.cpp (original)
+++ trunk/Scribus/scribus/pageitem_polyline.cpp Wed Mar 21 21:11:58 2012
@@ -126,7 +126,10 @@
p->setStrokeMode(ScPainter::Solid);
}
else
+ {
+ no_stroke = true;
p->setStrokeMode(ScPainter::None);
+ }
}
else
{
@@ -144,6 +147,8 @@
p->setStrokeMode(ScPainter::Solid);
p->strokePath();
}
+ else
+ no_stroke = true;
}
else
{
Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17394&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp (original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp Wed Mar 21 21:11:58 2012
@@ -58,7 +58,7 @@
void PageItem_Spiral::DrawObj_Item(ScPainter *p, QRectF /*e*/)
{
- if (m_Doc->RePos || PoLine.size() < 4)
+ if (m_Doc->RePos || PoLine.size() < 4)
return;
if (!m_Doc->layerOutline(LayerID))
@@ -132,7 +132,10 @@
p->setStrokeMode(ScPainter::Solid);
}
else
+ {
+ no_stroke = true;
p->setStrokeMode(ScPainter::None);
+ }
}
else
{
@@ -150,6 +153,8 @@
p->setStrokeMode(ScPainter::Solid);
p->strokePath();
}
+ else
+ no_stroke = true;
}
else
{
More information about the scribus-commit
mailing list