r24601 by jghali - Backport #16532: Using two times same image on consecutive masterpages removes image from previous masterpage
scribus-commit
scribus-commit at lists.scribus.net
Mon Apr 5 11:19:12 UTC 2021
Author: jghali
Date: Mon Apr 5 11:19:12 2021
New Revision: 24601
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24601
Log:
Backport #16532: Using two times same image on consecutive masterpages removes image from previous masterpage
Modified:
branches/Version156/Scribus/scribus/scribusview.cpp
Modified: branches/Version156/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24601&path=/branches/Version156/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version156/Scribus/scribus/scribusview.cpp (original)
+++ branches/Version156/Scribus/scribus/scribusview.cpp Mon Apr 5 11:19:12 2021
@@ -770,19 +770,21 @@
//Loop through all items and see which one(s) were under the drop point on the current layer
//Should make a nice function for this.
- //#9051 : loop in reverse order so that items in front of others are prioritized
+ //#9051: loop in reverse order so that items in front of others are prioritized
m_doc->m_Selection->delaySignalsOn();
for (int i = m_doc->Items->count() - 1; i >= 0 ; --i)
{
- if (m_doc->Items->at(i)->m_layerID==m_doc->activeLayer())
- {
- if (m_canvas->frameHitTest(dropPosDocQ, m_doc->Items->at(i)) >= Canvas::INSIDE)
- {
- deselectItems(false);
- m_doc->m_Selection->addItem(m_doc->Items->at(i));
- selectedItemByDrag = true;
- break;
- }
+ PageItem* item = m_doc->Items->at(i);
+ if (item->m_layerID != m_doc->activeLayer())
+ continue;
+ if ((m_doc->masterPageMode()) && (!((item->OwnPage == -1) || (item->OwnPage == m_doc->currentPage()->pageNr()))))
+ continue;
+ if (m_canvas->frameHitTest(dropPosDocQ, item) >= Canvas::INSIDE)
+ {
+ deselectItems(false);
+ m_doc->m_Selection->addItem(item);
+ selectedItemByDrag = true;
+ break;
}
}
m_doc->m_Selection->delaySignalsOff();
@@ -874,16 +876,18 @@
m_doc->m_Selection->delaySignalsOn();
for (int i = m_doc->Items->count() - 1; i >= 0 ; --i)
{
- if (m_doc->Items->at(i)->m_layerID==m_doc->activeLayer())
+ PageItem* item = m_doc->Items->at(i);
+ if (item->m_layerID != m_doc->activeLayer())
+ continue;
+ if ((m_doc->masterPageMode()) && (!((item->OwnPage == -1) || (item->OwnPage == m_doc->currentPage()->pageNr()))))
+ continue;
+ if ((m_canvas->frameHitTest(dropPosDocQ, m_doc->Items->at(i)) >= Canvas::INSIDE) && (item->itemType() == PageItem::Symbol))
{
- if ((m_canvas->frameHitTest(dropPosDocQ, m_doc->Items->at(i)) >= Canvas::INSIDE) && (m_doc->Items->at(i)->itemType() == PageItem::Symbol))
- {
- deselectItems(false);
- m_doc->m_Selection->addItem(m_doc->Items->at(i));
- m_doc->Items->at(i)->setPattern(patternVal);
- selectedItemByDrag=true;
- break;
- }
+ deselectItems(false);
+ m_doc->m_Selection->addItem(m_doc->Items->at(i));
+ m_doc->Items->at(i)->setPattern(patternVal);
+ selectedItemByDrag = true;
+ break;
}
}
m_doc->m_Selection->delaySignalsOff();
More information about the scribus-commit
mailing list