r16178 by fschmid - Finally getting rid of the "Groups" property of PageItem.
scribus-commit
scribus-commit at lists.scribus.net
Tue Dec 28 18:05:38 CET 2010
Author: fschmid
Date: Tue Dec 28 17:05:37 2010
New Revision: 16178
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16178
Log:
Finally getting rid of the "Groups" property of PageItem.
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16178&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue Dec 28 17:05:37 2010
@@ -180,7 +180,6 @@
LayerID(other.LayerID),
ScaleType(other.ScaleType),
AspectRatio(other.AspectRatio),
- Groups(other.Groups),
DashValues(other.DashValues),
DashOffset(other.DashOffset),
fill_gradient(other.fill_gradient),
@@ -576,7 +575,6 @@
UseEmbedded = true;
IRender = Intent_Relative_Colorimetric;
EmProfile = "";
- Groups.clear();
groupItemList.clear();
groupWidth = 1.0;
groupHeight = 1.0;
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16178&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Tue Dec 28 17:05:37 2010
@@ -533,7 +533,6 @@
int LayerID;
bool ScaleType;
bool AspectRatio;
- QStack<int> Groups;
QVector<double> DashValues;
double DashOffset;
const QVector<double>& dashes() const { return DashValues; }
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16178&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 Tue Dec 28 17:05:37 2010
@@ -2402,7 +2402,6 @@
QColor tmpc;
PageItem *currItem=NULL;
QString tmp;
- int xi;
double xf, yf, xf2;
QString clPath;
@@ -2778,33 +2777,6 @@
currItem->LayerID = attrs.valueAsInt("LAYER", 0);
tmp = "";
- if (attrs.hasAttribute("GROUPS") && (attrs.valueAsInt("NUMGROUP", 0) != 0))
- {
- int groupMax = doc->GroupCounter;
- QMap<int, int>::ConstIterator gIt;
- tmp = attrs.valueAsString("GROUPS");
- ScTextStream fg(&tmp, QIODevice::ReadOnly);
- currItem->Groups.clear();
- int numGroup = attrs.valueAsInt("NUMGROUP", 0);
- for (int cx = 0; cx < numGroup; ++cx)
- {
- fg >> xi;
- gIt = groupRemap.find(xi);
- if (gIt != groupRemap.end())
- currItem->Groups.push(gIt.value());
- else
- {
- currItem->Groups.push(groupMax);
- groupRemap.insert(xi, groupMax);
- ++groupMax;
- }
- }
- doc->GroupCounter = groupMax;
- tmp = "";
- }
- else
- currItem->Groups.clear();
-
QList<ParagraphStyle::TabRecord> tbs;
tmp = "";
if ((attrs.hasAttribute("NUMTAB")) && (attrs.valueAsInt("NUMTAB", 0) != 0))
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16178&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Dec 28 17:05:37 2010
@@ -8924,24 +8924,7 @@
view->SelectItemNr(itemNr);
}
if (isUndo)
- {
- uint docSelectionCount=doc->m_Selection->count();
- PageItem *currItem;
- uint lowestItem = 999999;
- for (uint a=0; a<docSelectionCount; ++a)
- {
- currItem = doc->m_Selection->itemAt(a);
- lowestItem = qMin(lowestItem, currItem->ItemNr);
- }
- if ((lowestItem > 0) && (doc->Items->at(lowestItem-1)->Groups.count() != 0))
- {
- if (doc->Items->at(lowestItem-1)->Groups.top() == doc->m_Selection->itemAt(0)->Groups.top())
- {
- view->SelectItemNr(lowestItem-1);
- }
- }
UnGroupObj();
- }
else
GroupObj(false);
}
@@ -8963,24 +8946,7 @@
if (isUndo)
GroupObj(false);
else
- {
- uint docSelectionCount=doc->m_Selection->count();
- PageItem *currItem;
- uint lowestItem = 999999;
- for (uint a=0; a<docSelectionCount; ++a)
- {
- currItem = doc->m_Selection->itemAt(a);
- lowestItem = qMin(lowestItem, currItem->ItemNr);
- }
- if ((lowestItem > 0) && (doc->Items->at(lowestItem-1)->Groups.count() != 0))
- {
- if (doc->Items->at(lowestItem-1)->Groups.top() == doc->m_Selection->itemAt(0)->Groups.top())
- {
- view->SelectItemNr(lowestItem-1);
- }
- }
UnGroupObj();
- }
}
void ScribusMainWindow::StatusPic()
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16178&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Tue Dec 28 17:05:37 2010
@@ -1447,24 +1447,7 @@
tmpSelection.addItem(Items->at(itemNr));
}
if (isUndo)
- {
- uint docSelectionCount=tmpSelection.count();
- PageItem *currItem;
- uint lowestItem = 999999;
- for (uint a=0; a<docSelectionCount; ++a)
- {
- currItem = tmpSelection.itemAt(a);
- lowestItem = qMin(lowestItem, currItem->ItemNr);
- }
- if ((lowestItem > 0) && (Items->at(lowestItem-1)->Groups.count() != 0))
- {
- if (Items->at(lowestItem-1)->Groups.top() == tmpSelection.itemAt(0)->Groups.top())
- {
- tmpSelection.addItem(Items->at(lowestItem-1), true);
- }
- }
itemSelection_UnGroupObjects(&tmpSelection);
- }
else
itemSelection_GroupObjects(false, false, &tmpSelection);
QRectF rect(x, y , w, h);
@@ -1494,24 +1477,7 @@
if (isUndo)
itemSelection_GroupObjects(false, false, &tmpSelection);
else
- {
- uint docSelectionCount=tmpSelection.count();
- PageItem *currItem;
- uint lowestItem = 999999;
- for (uint a=0; a<docSelectionCount; ++a)
- {
- currItem = tmpSelection.itemAt(a);
- lowestItem = qMin(lowestItem, currItem->ItemNr);
- }
- if ((lowestItem > 0) && (Items->at(lowestItem-1)->Groups.count() != 0))
- {
- if (Items->at(lowestItem-1)->Groups.top() == tmpSelection.itemAt(0)->Groups.top())
- {
- tmpSelection.addItem(Items->at(lowestItem-1));
- }
- }
itemSelection_UnGroupObjects(&tmpSelection);
- }
QRectF rect(x, y , w, h);
regionsChanged()->update(rect.adjusted(-10, -10, 20, 20));
m_Selection->delaySignalsOff();
@@ -8558,7 +8524,7 @@
for (uint de = 0; de < selectedItemCount; ++de)
{
currItem = itemSelection->itemAt(offs);
- if ((((currItem->isSingleSel) && (currItem->Groups.count() != 0)) || ((currItem->isSingleSel) && (currItem->isTableItem))) || (currItem->locked()))
+ if ((((currItem->isSingleSel) && (!Items->contains(currItem))) || ((currItem->isSingleSel) && (currItem->isTableItem))) || (currItem->locked()))
{
offs++;
continue;
More information about the scribus-commit
mailing list