/branches/Version13x/Scribus/scribus/page.cpp |
---|
213,8 → 213,7 |
{ |
//CB #3373 reinsert at old position and renumber items |
m_Doc->Items->insert(ite->ItemNr, ite); |
for (uint a = 0; a < m_Doc->Items->count(); ++a) |
m_Doc->Items->at(a)->ItemNr = a; |
m_Doc->renumberItemsInListOrder(); |
// m_Doc->Items->append(ite); |
// ite->ItemNr = m_Doc->Items->count()-1; |
m_Doc->view()->updateContents(); |
/branches/Version13x/Scribus/scribus/scribusview.cpp |
---|
6089,8 → 6089,7 |
{ |
Doc->Items->insert(currItem->ItemNr+1, bb); |
bb = Doc->Items->take(bb->ItemNr); |
for (uint a = 0; a < Doc->Items->count(); ++a) |
Doc->Items->at(a)->ItemNr = a; |
Doc->renumberItemsInListOrder(); |
} |
updateContents(); |
emit DocChanged(); |
6119,10 → 6118,7 |
{ |
Doc->Items->insert(currItem->ItemNr+1, bb); |
bb = Doc->Items->take(bb->ItemNr); |
for (uint a = 0; a < Doc->Items->count(); ++a) |
{ |
Doc->Items->at(a)->ItemNr = a; |
} |
Doc->renumberItemsInListOrder(); |
} |
updateContents(); |
emit DocChanged(); |
9390,10 → 9386,7 |
Doc->Items->insert(d+1, Doc->m_Selection->itemAt(Oindex[c])); |
} |
Doc->m_Selection->clear(); |
for (uint a = 0; a < Doc->Items->count(); ++a) |
{ |
Doc->Items->at(a)->ItemNr = a; |
} |
Doc->renumberItemsInListOrder(); |
m_ScMW->outlinePalette->BuildTree(); |
if (wasGUISelection) |
tempSelection.setIsGUISelection(true); |
9452,10 → 9445,7 |
Doc->Items->insert(d, Doc->m_Selection->itemAt(Oindex[c])); |
} |
Doc->m_Selection->clear(); |
for (uint a = 0; a < Doc->Items->count(); ++a) |
{ |
Doc->Items->at(a)->ItemNr = a; |
} |
Doc->renumberItemsInListOrder(); |
m_ScMW->outlinePalette->BuildTree(); |
if (wasGUISelection) |
tempSelection.setIsGUISelection(true); |
11223,19 → 11213,13 |
Doc->Items->insert(currItem->ItemNr+1, newGroupedItems.at(ag)); |
Doc->m_Selection->addItem(newGroupedItems.at(ag)); |
} |
for (uint a = 0; a < Doc->Items->count(); ++a) |
{ |
Doc->Items->at(a)->ItemNr = a; |
} |
Doc->renumberItemsInListOrder(); |
m_ScMW->GroupObj(); |
} |
else |
{ |
Doc->Items->insert(currItem->ItemNr+1, newGroupedItems.at(0)); |
for (uint a = 0; a < Doc->Items->count(); ++a) |
{ |
Doc->Items->at(a)->ItemNr = a; |
} |
Doc->renumberItemsInListOrder(); |
} |
uint toDeleteItemCount=delItems.count(); |
if (toDeleteItemCount != 0) |
/branches/Version13x/Scribus/scribus/scribus.cpp |
---|
8165,10 → 8165,7 |
doc->Items->insert(lowestItem+1, doc->m_Selection->itemAt(Oindex[c])); |
} |
for (uint a = 0; a < doc->Items->count(); ++a) |
{ |
doc->Items->at(a)->ItemNr = a; |
} |
doc->renumberItemsInListOrder(); |
doc->m_Selection->prependItem(neu); |
selectedItemCount=doc->m_Selection->count(); |
SimpleState *ss = new SimpleState(Um::Group, tooltip); |
8212,10 → 8209,7 |
{ |
doc->m_Selection->removeItem(doc->Items->at(lowestItem)); |
doc->Items->remove(lowestItem); |
for (uint a = 0; a < doc->Items->count(); ++a) |
{ |
doc->Items->at(a)->ItemNr = a; |
} |
doc->renumberItemsInListOrder(); |
} |
docSelectionCount = doc->m_Selection->count(); |
SimpleState *ss = new SimpleState(Um::Ungroup); |
/branches/Version13x/Scribus/scribus/scribusdoc.cpp |
---|
3506,6 → 3506,13 |
FrameItems.at(a)->ItemNr = a; |
} |
void ScribusDoc::renumberItemsInListOrder( ) |
{ |
uint itemsCount=Items->count(); |
for (uint i = 0; i < itemsCount; ++i) |
Items->at(i)->ItemNr = i; |
} |
bool ScribusDoc::usesAutomaticTextFrames() const |
{ |
return automaticTextFrames; |
4621,10 → 4628,7 |
{ |
Items->prepend(m_Selection->itemAt(Oindex[c])); |
} |
for (uint a = 0; a < Items->count(); ++a) |
{ |
Items->at(a)->ItemNr = a; |
} |
renumberItemsInListOrder(); |
return true; |
} |
return false; |
4651,10 → 4655,7 |
{ |
Items->append(m_Selection->itemAt(Oindex[c])); |
} |
for (uint a = 0; a < Items->count(); ++a) |
{ |
Items->at(a)->ItemNr = a; |
} |
renumberItemsInListOrder(); |
return true; |
} |
return false; |
6234,10 → 6235,7 |
} |
} |
updateFrameItems(); |
for (uint a = 0; a < Items->count(); ++a) |
{ |
Items->at(a)->ItemNr = a; |
} |
renumberItemsInListOrder(); |
if (selectedItemCount > 1) |
undoManager->commit(); |
updateContents(); |
7791,3 → 7789,4 |
} |
} |
} |
/branches/Version13x/Scribus/scribus/scribusdoc.h |
---|
551,8 → 551,15 |
* @brief Run this common frame item update code |
*/ |
void updateFrameItems(); |
/** |
* @brief Renumbers the items into the order they are stored in in the lists. |
* Utility function used in various places, basically handles keeping items numbered in the way |
* they are layered. When layer is a property and not a fuction of storage, this should be removed. |
* Depends on the Items pointer pointing to the correct item list (doc, master, etc). |
* @sa updateFrameItems(); |
*/ |
void renumberItemsInListOrder(); |
/** |
* @brief Doc uses automatic text frames? |
*/ |
bool usesAutomaticTextFrames() const; |
651,10 → 658,6 |
*/ |
void updateSectionPageNumbersToPages(); |
/** |
* |
* |
*/ |
/** |
* |
* @param otherPageIndex |
* @param location |