Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16155 → Rev 16156

/trunk/Scribus/scribus/canvas.cpp
436,6 → 436,12
currClip.closeSubpath();
if (currPath.intersects(mouseArea) || currClip.intersects(mouseArea))
{
if (currItem->isGroup() && allowInGroup)
{
PageItem* ret = itemInGroup(currItem, itemPos, mouseArea);
if (ret != NULL)
return ret;
}
return currItem;
}
}
/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
238,23 → 238,51
{
// Build a list of all Fonts used in Annotations;
PageItem *pgit;
for (int c = 0; c < m_doc->FrameItems.count(); ++c)
QList<PageItem*> allItems;
for (int a = 0; a < m_doc->FrameItems.count(); ++a)
{
pgit=m_doc->FrameItems.at(c);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
PageItem *currItem = m_doc->FrameItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
pgit = allItems.at(ii);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
}
allItems.clear();
}
for (int c = 0; c < m_doc->MasterItems.count(); ++c)
for (int a = 0; a < m_doc->MasterItems.count(); ++a)
{
pgit=m_doc->MasterItems.at(c);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
PageItem *currItem = m_doc->MasterItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
pgit = allItems.at(ii);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
}
allItems.clear();
}
for (int c = 0; c < m_doc->DocItems.count(); ++c)
for (int a = 0; a < m_doc->DocItems.count(); ++a)
{
pgit=m_doc->DocItems.at(c);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
PageItem *currItem = m_doc->DocItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
pgit = allItems.at(ii);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
}
allItems.clear();
}
QMap<QString,int>::const_iterator it;
availableFontsListWidget->clear();
/trunk/Scribus/scribus/ui/propertiespalette.cpp
4698,13 → 4698,24
return;
}
bool found = false;
for (int b = 0; b < doc->Items->count(); ++b)
QList<PageItem*> allItems;
for (int a = 0; a < doc->Items->count(); ++a)
{
if ((NameNew == doc->Items->at(b)->itemName()) && (doc->Items->at(b) != CurItem))
PageItem *currItem = doc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
found = true;
break;
PageItem* item = allItems.at(ii);
if ((NameNew == item->itemName()) && (item != CurItem))
{
found = true;
break;
}
}
allItems.clear();
}
if (found)
{
/trunk/Scribus/scribus/ui/selfield.cpp
40,19 → 40,29
Layout1->addWidget( Text1 );
AvailFields = new QListWidget( this );
AvailFields->setMinimumSize( QSize( 130, 180 ) );
for (int se = 0; se < Doc->Items->count(); ++se)
QList<PageItem*> allItems;
for (int a = 0; a < Doc->Items->count(); ++a)
{
PageItem* item = Doc->Items->at(se);
if (Art < 2)
{
if ((item->isAnnotation()) && ((item->annotation().Type() > 1) && (item->annotation().Type() < 12)))
AvailFields->addItem(item->itemName());
}
PageItem *currItem = Doc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
if ((item->isAnnotation()) && (item->annotation().Type() == Art) && (item->itemName() != Own))
AvailFields->addItem(item->itemName());
PageItem* item = allItems.at(ii);
if (Art < 2)
{
if ((item->isAnnotation()) && ((item->annotation().Type() > 1) && (item->annotation().Type() < 12)))
AvailFields->addItem(item->itemName());
}
else
{
if ((item->isAnnotation()) && (item->annotation().Type() == Art) && (item->itemName() != Own))
AvailFields->addItem(item->itemName());
}
}
allItems.clear();
}
Layout1->addWidget( AvailFields );
Layout5->addLayout( Layout1 );
/trunk/Scribus/scribus/ui/outlinepalette.cpp
296,13 → 296,24
else
{
bool found = false;
for (int b = 0; b < currDoc->Items->count(); ++b)
QList<PageItem*> allItems;
for (int a = 0; a < currDoc->Items->count(); ++a)
{
if ((NameNew == currDoc->Items->at(b)->itemName()) && (currDoc->Items->at(b) != item->PageItemObject))
PageItem *currItem = currDoc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
found = true;
break;
PageItem* ite = allItems.at(ii);
if ((NameNew == ite->itemName()) && (ite != item->PageItemObject))
{
found = true;
break;
}
}
allItems.clear();
}
if (found)
{
612,15 → 623,9
if (!currDoc->masterPageMode())
emit selectMasterPage(item->PageItemObject->OnMasterPage);
if (item->PageItemObject->isGroup())
emit selectElement(-1, item->PageItemObject->ItemNr, false);
emit selectElementByItem(pgItem, false);
else
{
pgItem = item->PageItemObject;
if (item->PageItemObject->isGroup())
emit selectElement(-1, item->PageItemObject->ItemNr, false);
else
emit selectElementByItem(pgItem, true);
}
emit selectElementByItem(pgItem, true);
break;
case 2:
pg = item->PageObject->pageNr();
632,14 → 637,9
pgItem = item->PageItemObject;
m_MainWindow->closeActiveWindowMasterPageEditor();
if (pgItem->isGroup())
emit selectElement(pgItem->OwnPage, pgItem->ItemNr, false);
emit selectElementByItem(pgItem, false);
else
{
if (pgItem->isGroup())
emit selectElement(pgItem->OwnPage, pgItem->ItemNr, false);
else
emit selectElementByItem(pgItem, true);
}
emit selectElementByItem(pgItem, true);
break;
default:
break;
/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
1060,23 → 1060,51
{
// Build a list of all Fonts used in Annotations;
PageItem *pgit;
for (int c = 0; c < doc->FrameItems.count(); ++c)
QList<PageItem*> allItems;
for (int a = 0; a < doc->FrameItems.count(); ++a)
{
pgit = doc->FrameItems.at(c);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
PageItem *currItem = doc->FrameItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
pgit = allItems.at(ii);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
}
allItems.clear();
}
for (int c = 0; c < doc->MasterItems.count(); ++c)
for (int a = 0; a < doc->MasterItems.count(); ++a)
{
pgit = doc->MasterItems.at(c);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
PageItem *currItem = doc->MasterItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
pgit = allItems.at(ii);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
}
allItems.clear();
}
for (int c = 0; c < doc->DocItems.count(); ++c)
for (int a = 0; a < doc->DocItems.count(); ++a)
{
pgit = doc->DocItems.at(c);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
PageItem *currItem = doc->DocItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
pgit = allItems.at(ii);
if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()) && (pgit->itemText.length() > 0))
AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
}
allItems.clear();
}
QMap<QString,int>::const_iterator it;
AvailFlist->clear();
/trunk/Scribus/scribus/ui/annot.cpp
1208,13 → 1208,24
return;
}
bool found = false;
for (int b = 0; b < view->Doc->Items->count(); ++b)
QList<PageItem*> allItems;
for (int a = 0; a < view->Doc->Items->count(); ++a)
{
if ((NameNew == view->Doc->Items->at(b)->itemName()) && (view->Doc->Items->at(b) != item))
PageItem *currItem = view->Doc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
found = true;
break;
PageItem* ite = allItems.at(ii);
if ((NameNew == ite->itemName()) && (ite != item))
{
found = true;
break;
}
}
allItems.clear();
}
if (found)
{
/trunk/Scribus/scribus/ui/outlinepalette.h
76,7 → 76,6
 
signals:
void ToggleAllPalettes();
void selectElement(int, int, bool);
void selectElementByItem(PageItem *, bool);
void selectPage(int);
void selectMasterPage(QString);
/trunk/Scribus/scribus/ui/tocindexprefs.cpp
159,10 → 159,21
itemDestFrameComboBox->addItem(trStrNone);
if (currDoc!=NULL)
{
for (int d = 0; d < currDoc->DocItems.count(); ++d)
QList<PageItem*> allItems;
for (int a = 0; a < currDoc->DocItems.count(); ++a)
{
if (currDoc->DocItems.at(d)->itemType()==PageItem::TextFrame)
itemDestFrameComboBox->addItem(currDoc->DocItems.at(d)->itemName());
PageItem *currItem = currDoc->DocItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
currItem = allItems.at(ii);
if (currItem->itemType() == PageItem::TextFrame)
itemDestFrameComboBox->addItem(currItem->itemName());
}
allItems.clear();
}
}
else
/trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
106,10 → 106,21
itemDestFrameComboBox->addItem(CommonStrings::tr_None);
if (m_Doc!=NULL)
{
for (int d = 0; d < m_Doc->DocItems.count(); ++d)
QList<PageItem*> allItems;
for (int a = 0; a < m_Doc->DocItems.count(); ++a)
{
if (m_Doc->DocItems.at(d)->itemType()==PageItem::TextFrame)
itemDestFrameComboBox->addItem(m_Doc->DocItems.at(d)->itemName());
PageItem *currItem = m_Doc->DocItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
currItem = allItems.at(ii);
if (currItem->itemType() == PageItem::TextFrame)
itemDestFrameComboBox->addItem(currItem->itemName());
}
allItems.clear();
}
}
else
/trunk/Scribus/scribus/scribus.cpp
588,7 → 588,7
connect(docCheckerPalette, SIGNAL(selectElementByItem(PageItem *, bool)), this, SLOT(selectItemsFromOutlines(PageItem *, bool)));
connect(docCheckerPalette, SIGNAL(selectPage(int)), this, SLOT(selectPagesFromOutlines(int)));
connect(docCheckerPalette, SIGNAL(selectMasterPage(QString)), this, SLOT(manageMasterPages(QString)));
connect(outlinePalette, SIGNAL(selectElement(int, int, bool)), this, SLOT(selectItemsFromOutlines(int, int, bool)));
// connect(outlinePalette, SIGNAL(selectElement(int, int, bool)), this, SLOT(selectItemsFromOutlines(int, int, bool)));
connect(outlinePalette, SIGNAL(selectElementByItem(PageItem *, bool)), this, SLOT(selectItemsFromOutlines(PageItem *, bool)));
connect(outlinePalette, SIGNAL(selectPage(int)), this, SLOT(selectPagesFromOutlines(int)));
connect(outlinePalette, SIGNAL(selectMasterPage(QString)), this, SLOT(manageMasterPages(QString)));
5896,10 → 5896,20
if (doc)
{
doc->guidesPrefs().showPic = !doc->guidesPrefs().showPic;
for (int b=0; b<doc->Items->count(); ++b)
QList<PageItem*> allItems;
for (int a = 0; a < doc->Items->count(); ++a)
{
if (doc->Items->at(b)->asImageFrame())
doc->Items->at(b)->setImageShown(doc->guidesPrefs().showPic);
PageItem *currItem = doc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
PageItem* item = allItems.at(ii);
if (item->asImageFrame())
item->setImageShown(doc->guidesPrefs().showPic);
}
}
view->DrawNew();
}
/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
184,47 → 184,50
 
 
PageItem *pItem;
 
for ( int i = 0; i < srcDoc->MasterItems.count(); ++i )
QList<PageItem*> allItems;
for (int a = 0; a < srcDoc->MasterItems.count(); ++a)
{
pItem = srcDoc->MasterItems.at ( i );
 
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( !pItem->asLatexFrame() ) )
PageItem *currItem = srcDoc->MasterItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
QString itemText;
 
if ( pItem->PictureIsAvailable )
pItem = allItems.at(ii);
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( !pItem->asLatexFrame() ) )
{
itemText = QString ( "Frame %1" ).arg ( i+1 );
QString itemText;
if ( pItem->PictureIsAvailable )
itemText = QString ( "Frame %1" ).arg ( pItem->itemName() );
else
itemText = QString ( "Frame %1 (empty)" ).arg ( pItem->itemName() );
insertFramesCombobox->addItem ( itemText, 0 );
}
else
{
itemText = QString ( "Frame %1 (empty)" ).arg ( i+1 );
}
 
insertFramesCombobox->addItem ( itemText, 0 );
}
allItems.clear();
}
 
for ( int i = 0; i < srcDoc->Items->count(); ++i )
for (int a = 0; a < srcDoc->Items->count(); ++a)
{
pItem = srcDoc->Items->at ( i );
 
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( !pItem->asLatexFrame() ) )
PageItem *currItem = srcDoc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
QString itemText;
 
if ( pItem->PictureIsAvailable )
pItem = allItems.at(ii);
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( !pItem->asLatexFrame() ) )
{
itemText = QString ( "Frame %1" ).arg ( i+1 );
QString itemText;
if ( pItem->PictureIsAvailable )
itemText = QString ( "Frame %1" ).arg ( pItem->itemName() );
else
itemText = QString ( "Frame %1 (empty)" ).arg ( pItem->itemName() );
insertFramesCombobox->addItem ( itemText, 0 );
}
else
{
itemText = QString ( "Frame %1 (empty)" ).arg ( i+1 );
}
 
insertFramesCombobox->addItem ( itemText, 0 );
}
allItems.clear();
}
 
 
603,34 → 606,47
{
PageItem *pItem;
QStringList imageFiles;
 
int id = item->data ( 0, Qt::UserRole ).toInt();
 
 
for ( int i = 0; i < srcDoc->MasterItems.count(); ++i )
QList<PageItem*> allItems;
for (int a = 0; a < srcDoc->MasterItems.count(); ++a)
{
pItem = srcDoc->MasterItems.at ( i );
 
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( pItem->PictureIsAvailable ) && ( !pItem->asLatexFrame() ) )
PageItem *currItem = srcDoc->MasterItems.at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
if ( ( id == 0 ) || ( ( id-1 ) == pItem->OwnPage ) )
pItem = allItems.at(ii);
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( pItem->PictureIsAvailable ) && ( !pItem->asLatexFrame() ) )
{
imageFiles.append ( pItem->Pfile );
if ( ( id == 0 ) || ( ( id-1 ) == pItem->OwnPage ) )
{
imageFiles.append ( pItem->Pfile );
}
}
}
allItems.clear();
}
 
for ( int i = 0; i < srcDoc->Items->count(); ++i )
for (int a = 0; a < srcDoc->Items->count(); ++a)
{
pItem = srcDoc->Items->at ( i );
 
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( pItem->PictureIsAvailable ) && ( !pItem->asLatexFrame() ) )
PageItem *currItem = srcDoc->Items->at(a);
if (currItem->isGroup())
allItems = currItem->getItemList();
else
allItems.append(currItem);
for (int ii = 0; ii < allItems.count(); ii++)
{
if ( ( id == 0 ) || ( ( id-1 ) == pItem->OwnPage ) )
pItem = allItems.at(ii);
if ( ( pItem->itemType() == PageItem::ImageFrame ) && ( pItem->PictureIsAvailable ) && ( !pItem->asLatexFrame() ) )
{
imageFiles.append ( pItem->Pfile );
if ( ( id == 0 ) || ( ( id-1 ) == pItem->OwnPage ) )
{
imageFiles.append ( pItem->Pfile );
}
}
}
allItems.clear();
}
 
//todo: check if item is selected: item->isSelected()
/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
115,32 → 115,16
bool ret = ScActionPlugin::handleSelection(doc, SelectedType);
if (!ret)
{
if (doc->m_Selection->count() > 1)
if (doc->m_Selection->count() == 2)
{
bool isGroup = true;
int firstElem = -1;
PageItem *currItem = doc->m_Selection->itemAt(0);
if (currItem->Groups.count() != 0)
if (currItem->isGroup())
{
firstElem = currItem->Groups.top();
for (int bx = 0; bx < doc->m_Selection->count() - 1; ++bx)
{
PageItem* bxi = doc->m_Selection->itemAt(bx);
if (bxi->Groups.count() != 0)
{
if (bxi->Groups.top() != firstElem)
isGroup = false;
if (currItem->itemType() == PageItem::Line)
isGroup = false;
}
else
isGroup = false;
}
currItem = doc->m_Selection->itemAt(doc->m_Selection->count() - 1);
currItem = doc->m_Selection->itemAt(1);
if (currItem->itemType() != PageItem::PolyLine)
ret = false;
else
ret = isGroup;
ret = true;
}
else
{
149,23 → 133,9
else
{
currItem = doc->m_Selection->itemAt(1);
if (currItem->Groups.count() != 0)
if (currItem->isGroup())
{
firstElem = currItem->Groups.top();
for (int bx = 1; bx < doc->m_Selection->count(); ++bx)
{
PageItem* bxi = doc->m_Selection->itemAt(bx);
if (bxi->Groups.count() != 0)
{
if (bxi->Groups.top() != firstElem)
isGroup = false;
if (currItem->itemType() == PageItem::Line)
isGroup = false;
}
else
isGroup = false;
}
ret = isGroup;
ret = true;
}
}
}
187,11 → 157,11
currDoc = ScCore->primaryMainWindow()->doc;
if (currDoc->m_Selection->count() > 1)
{
if ((currDoc->m_Selection->itemAt(0)->Groups.count() != 0) || (currDoc->m_Selection->itemAt(1)->Groups.count() != 0))
if ((currDoc->m_Selection->itemAt(0)->isGroup()) || (currDoc->m_Selection->itemAt(1)->isGroup()))
{
selOffs = 0;
selCount = currDoc->m_Selection->count() - 1;
if (currDoc->m_Selection->itemAt(0)->Groups.count() == 0)
if (!currDoc->m_Selection->itemAt(0)->isGroup())
{
pathItem = currDoc->m_Selection->itemAt(0);
selOffs = 1;
202,14 → 172,21
QTransform mp;
mp.rotate(pathItem->rotation());
effectPath.map(mp);
for (int bx = 0; bx < selCount; ++bx)
PageItem* bxi = currDoc->m_Selection->itemAt(selOffs);
originalPathG.append(bxi->PoLine.copy());
originalXPosG.append(bxi->xPos());
originalYPosG.append(bxi->yPos());
originalRotG.append(bxi->rotation());
patternItemG.append(bxi);
QList<PageItem*> bxiL = bxi->getItemList();
for (int bx = 0; bx < bxiL.count(); ++bx)
{
PageItem* bxi = currDoc->m_Selection->itemAt(bx + selOffs);
originalPathG.append(bxi->PoLine.copy());
originalXPosG.append(bxi->xPos());
originalYPosG.append(bxi->yPos());
originalRotG.append(bxi->rotation());
patternItemG.append(bxi);
PageItem* cIte = bxiL.at(bx);
originalPathG.append(cIte->PoLine.copy());
originalXPosG.append(cIte->xPos());
originalYPosG.append(cIte->yPos());
originalRotG.append(cIte->rotation());
patternItemG.append(cIte);
}
QPainterPath tmpPath = effectPath.toQPainterPath(false);
PathDialog *dia = new PathDialog(currDoc->scMW(), currDoc->unitIndex(), tmpPath.length(), true);
286,7 → 263,7
bxi->FrameType = 3;
bxi->setXYPos(originalXPosG[bx], originalYPosG[bx]);
bxi->setRotation(originalRotG[bx]);
currDoc->AdjustItemSize(bxi);
currDoc->AdjustItemSize(bxi, true);
bxi->OldB2 = bxi->width();
bxi->OldH2 = bxi->height();
bxi->updateClip();
329,9 → 306,21
bxi->ClipEdited = true;
bxi->FrameType = 3;
bxi->setXYPos(pathItem->xPos()+deltaX, pathItem->yPos()+deltaY);
currDoc->AdjustItemSize(bxi);
if (!bxi->isGroup())
{
bxi->gXpos = deltaX;
bxi->gYpos = deltaY;
}
double oW = bxi->width();
double oH = bxi->height();
currDoc->AdjustItemSize(bxi, true);
bxi->OldB2 = bxi->width();
bxi->OldH2 = bxi->height();
if (bxi->isGroup())
{
bxi->groupWidth = bxi->groupWidth * (bxi->OldB2 / oW);
bxi->groupHeight = bxi->groupHeight * (bxi->OldH2 / oH);
}
bxi->updateClip();
bxi->ContourLine = bxi->PoLine.copy();
}
379,7 → 368,7
patternItem->setXYPos(pathItem->xPos(), pathItem->yPos());
patternItem->setRotation(0);
}
currDoc->AdjustItemSize(patternItem);
currDoc->AdjustItemSize(patternItem, true);
patternItem->OldB2 = patternItem->width();
patternItem->OldH2 = patternItem->height();
patternItem->updateClip();