r18812 by jghali - #12044: 2 frames are linked to same frame
scribus-commit
scribus-commit at lists.scribus.net
Wed Feb 12 21:52:36 UTC 2014
Author: jghali
Date: Wed Feb 12 21:52:36 2014
New Revision: 18812
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18812
Log:
#12044: 2 frames are linked to same frame
Modified:
trunk/Scribus/scribus/canvasmode_framelinks.cpp
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18812&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Wed Feb 12 21:52:36 2014
@@ -186,7 +186,7 @@
if (bb->prevInChain() != NULL)
{
QMessageBox msgBox(QMessageBox::Question, tr("Linking Text Frames"),
- "<qt>" + ScribusView::tr("Do you want to insert the frame into the selected text chain? If so, where would you like to insert it?") + "<qt>");
+ "<qt>" + ScribusView::tr("You are trying to insert a frame into an existing text chain, where would you like to insert it?") + "<qt>");
//QMessageBox msgBox;
QPushButton *cancelButton = msgBox.addButton(CommonStrings::tr_Cancel, QMessageBox::RejectRole);
QPushButton *beforeButton = msgBox.addButton(tr("Before"), QMessageBox::AcceptRole);
@@ -196,6 +196,8 @@
break;
if ((QPushButton *) msgBox.clickedButton() == beforeButton)
{
+ if (currItem->prevInChain())
+ currItem->prevInChain()->unlink();
PageItem *prev = bb->prevInChain();
prev->unlink();
prev->link(currItem);
@@ -204,6 +206,8 @@
{
if (bb->nextInChain() != NULL)
{
+ if (currItem->prevInChain())
+ currItem->prevInChain()->unlink();
PageItem *next = bb->nextInChain();
bb->unlink();
bb->link(currItem);
@@ -217,6 +221,8 @@
}
}
}
+ if (bb->prevInChain())
+ bb->prevInChain()->unlink();
currItem->link(bb);
int cid = m_doc->Items->indexOf(currItem);
int bid = m_doc->Items->indexOf(bb);
More information about the scribus-commit
mailing list