Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 22119 → Rev 22120

/trunk/Scribus/scribus/selection.cpp
466,6 → 466,21
return QRectF(x,y,w,h);
}
 
bool Selection::containsItemType(PageItem::ItemType type) const
{
if (m_SelList.isEmpty())
return false;
SelectionList::ConstIterator it = m_SelList.begin();
SelectionList::ConstIterator itend = m_SelList.end();
PageItem::ItemType itemType = (*it)->itemType();
for (; it != itend; ++it)
{
if ((*it)->itemType() == itemType)
return true;
}
return false;
}
 
bool Selection::itemsAreSameType() const
{
//CB Putting count=1 before isempty test as its probably the most likely, given our view code.
/trunk/Scribus/scribus/selection.h
150,6 → 150,8
QRectF getGroupRect();
void getVisualGroupRect(double *x, double *y, double *w, double *h);
QRectF getVisualGroupRect();
//!\brief Test if selection contains object of specified item type
bool containsItemType(PageItem::ItemType type) const;
//!\brief Test to see if all items in the selection are the same typedef
bool itemsAreSameType() const;