r17410 by fschmid - Editing inline frames works now by double clicking on them in the Inline Palette.
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 1 14:47:05 UTC 2012
Author: fschmid
Date: Sun Apr 1 14:47:05 2012
New Revision: 17410
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17410
Log:
Editing inline frames works now by double clicking on them in the Inline Palette.
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribus.h
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/scribusview.h
trunk/Scribus/scribus/ui/inlinepalette.cpp
trunk/Scribus/scribus/ui/inlinepalette.h
trunk/Scribus/scribus/ui/outlinepalette.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Apr 1 14:47:05 2012
@@ -567,8 +567,8 @@
inlinePalette->setMainWindow(this);
connect(scrActions["toolsInline"], SIGNAL(toggled(bool)), inlinePalette, SLOT(setPaletteShown(bool)));
connect(inlinePalette, SIGNAL(paletteShown(bool)), scrActions["toolsInline"], SLOT(setChecked(bool)));
-// connect(inlinePalette, SIGNAL(startEdit(QString)), this, SLOT(editSymbolStart(QString)));
-// connect(inlinePalette, SIGNAL(endEdit()), this, SLOT(editSymbolEnd()));
+ connect(inlinePalette, SIGNAL(startEdit(int)), this, SLOT(editInlineStart(int)));
+ connect(inlinePalette, SIGNAL(endEdit()), this, SLOT(editInlineEnd()));
inlinePalette->installEventFilter(this);
inlinePalette->hide();
@@ -1458,7 +1458,7 @@
return;
break;
case Qt::Key_PageUp:
- if (doc->masterPageMode() || doc->symbolEditMode())
+ if (doc->masterPageMode() || doc->symbolEditMode() || doc->inlineEditMode())
view->scrollBy(0, -prefsManager->mouseWheelJump());
else
{
@@ -1474,7 +1474,7 @@
return;
break;
case Qt::Key_PageDown:
- if (doc->masterPageMode() || doc->symbolEditMode())
+ if (doc->masterPageMode() || doc->symbolEditMode() || doc->inlineEditMode())
view->scrollBy(0, prefsManager->mouseWheelJump());
else
{
@@ -2294,7 +2294,7 @@
view->requestMode(submodeEndNodeEdit);
} */
scrActions["fileClose"]->setEnabled(true);
- if (doc->masterPageMode() || doc->symbolEditMode())
+ if (doc->masterPageMode() || doc->symbolEditMode() || doc->inlineEditMode())
{
scrActions["pageInsert"]->setEnabled(false);
scrActions["pageDelete"]->setEnabled(false);
@@ -2305,7 +2305,7 @@
scrActions["editMasterPages"]->setEnabled(false);
scrActions["fileNew"]->setEnabled(false);
scrActions["fileNewFromTemplate"]->setEnabled(false);
- if (doc->symbolEditMode())
+ if (doc->symbolEditMode() || doc->inlineEditMode())
{
scrActions["fileCollect"]->setEnabled(false);
scrActions["fileSaveAs"]->setEnabled(false);
@@ -3236,7 +3236,7 @@
// scrActions["fileSaveAs"]->setEnabled(true);
if (!doc->masterPageMode())
{
- if (!doc->symbolEditMode())
+ if (!doc->symbolEditMode() && !doc->inlineEditMode())
{
if (doc->hasName)
scrActions["fileRevert"]->setEnabled(true);
@@ -4504,6 +4504,11 @@
if (doc->symbolEditMode())
{
editSymbolEnd();
+ return true;
+ }
+ else if (doc->inlineEditMode())
+ {
+ editInlineEnd();
return true;
}
ScribusWin* tw = ActWin;
@@ -7523,7 +7528,7 @@
view->requestMode(submodeEndNodeEdit);
activateWindow();
view->Deselect(true);
- if (!doc->symbolEditMode())
+ if (!doc->symbolEditMode() && !doc->inlineEditMode())
{
if ((ite->OwnPage != -1) && (ite->OwnPage != static_cast<int>(doc->currentPage()->pageNr())))
view->GotoPage(ite->OwnPage);
@@ -8490,6 +8495,111 @@
updateActiveWindowCaption(doc->DocName);
}
+void ScribusMainWindow::editInlineStart(int id)
+{
+ if (HaveDoc)
+ {
+ view->Deselect(true);
+ storedPageNum = doc->currentPageNumber();
+ storedViewXCoor = view->contentsX();
+ storedViewYCoor = view->contentsY();
+ storedViewScale = view->scale();
+ view->showInlinePage(id);
+ scrActions["pageInsert"]->setEnabled(false);
+ scrActions["pageImport"]->setEnabled(false);
+ scrActions["pageDelete"]->setEnabled(false);
+ scrActions["pageCopy"]->setEnabled(false);
+ scrActions["pageMove"]->setEnabled(false);
+ scrActions["pageApplyMasterPage"]->setEnabled(false);
+ scrActions["pageCopyToMasterPage"]->setEnabled(false);
+ scrActions["editMasterPages"]->setEnabled(false);
+ scrActions["fileNew"]->setEnabled(false);
+ scrActions["fileNewFromTemplate"]->setEnabled(false);
+ scrActions["fileOpen"]->setEnabled(false);
+ scrActions["fileSave"]->setEnabled(false);
+ scrActions["fileClose"]->setToolTip( tr("Click here to leave inline frame edit mode."));
+ scrMenuMgr->setMenuEnabled("FileOpenRecent", false);
+ scrActions["fileRevert"]->setEnabled(false);
+ scrActions["fileDocSetup150"]->setEnabled(false);
+ scrActions["filePrint"]->setEnabled(false);
+ scrActions["fileCollect"]->setEnabled(false);
+ scrActions["fileSaveAs"]->setEnabled(false);
+ scrMenuMgr->setMenuEnabled("FileExport", false);
+ scrActions["fileExportAsEPS"]->setEnabled(false);
+ scrActions["fileExportAsPDF"]->setEnabled(false);
+ scrActions["PrintPreview"]->setEnabled(false);
+ scrActions["toolsPDFPushButton"]->setEnabled(false);
+ scrActions["toolsPDFTextField"]->setEnabled(false);
+ scrActions["toolsPDFCheckBox"]->setEnabled(false);
+ scrActions["toolsPDFComboBox"]->setEnabled(false);
+ scrActions["toolsPDFListBox"]->setEnabled(false);
+ scrActions["toolsPDFAnnotText"]->setEnabled(false);
+#ifdef HAVE_OSG
+ scrActions["toolsPDFAnnot3D"]->setEnabled(false);
+#endif
+ pagePalette->enablePalette(false);
+ layerPalette->setEnabled(false);
+ inlinePalette->editingStart();
+ if (outlinePalette->isVisible())
+ outlinePalette->BuildTree(false);
+ updateActiveWindowCaption( tr("Editing Inline Frame"));
+ }
+}
+
+void ScribusMainWindow::editInlineEnd()
+{
+ view->hideInlinePage();
+ slotSelect();
+ scrActions["editMasterPages"]->setEnabled(true);
+ scrActions["fileNew"]->setEnabled(true);
+ scrActions["fileNewFromTemplate"]->setEnabled(true);
+ scrActions["fileOpen"]->setEnabled(true);
+ scrActions["fileClose"]->setEnabled(true);
+ scrActions["fileClose"]->setToolTip( tr("Close"));
+ scrActions["fileSave"]->setEnabled(true);
+ scrMenuMgr->setMenuEnabled("FileOpenRecent", true);
+ scrActions["fileRevert"]->setEnabled(true);
+ scrActions["fileDocSetup150"]->setEnabled(true);
+ scrActions["filePrint"]->setEnabled(true);
+ scrActions["fileCollect"]->setEnabled(true);
+ scrActions["fileSaveAs"]->setEnabled(true);
+ scrMenuMgr->setMenuEnabled("FileExport", true);
+ scrActions["fileExportAsEPS"]->setEnabled(true);
+ scrActions["fileExportAsPDF"]->setEnabled(true);
+ if ( ScCore->haveGS() || ScCore->isWinGUI() )
+ scrActions["PrintPreview"]->setEnabled(true);
+ scrActions["pageInsert"]->setEnabled(true);
+ scrActions["pageCopy"]->setEnabled(true);
+ scrActions["pageImport"]->setEnabled(true);
+ scrActions["pageApplyMasterPage"]->setEnabled(true);
+ scrActions["pageCopyToMasterPage"]->setEnabled(true);
+ bool setter = doc->DocPages.count() > 1 ? true : false;
+ scrActions["pageDelete"]->setEnabled(setter);
+ scrActions["pageMove"]->setEnabled(setter);
+ scrActions["toolsPDFPushButton"]->setEnabled(true);
+ scrActions["toolsPDFTextField"]->setEnabled(true);
+ scrActions["toolsPDFCheckBox"]->setEnabled(true);
+ scrActions["toolsPDFComboBox"]->setEnabled(true);
+ scrActions["toolsPDFListBox"]->setEnabled(true);
+ scrActions["toolsPDFAnnotText"]->setEnabled(true);
+#ifdef HAVE_OSG
+ scrActions["toolsPDFAnnot3D"]->setEnabled(true);
+#endif
+ pagePalette->enablePalette(true);
+ pagePalette->rebuildMasters();
+ view->setScale(storedViewScale);
+ doc->setCurrentPage(doc->DocPages.at(storedPageNum));
+ view->setContentsPos(static_cast<int>(storedViewXCoor * storedViewScale), static_cast<int>(storedViewYCoor * storedViewScale));
+ view->DrawNew();
+ pagePalette->Rebuild();
+ propertiesPalette->updateColorList();
+ inlinePalette->editingFinished();
+ layerPalette->setEnabled(true);
+ if (outlinePalette->isVisible())
+ outlinePalette->BuildTree(false);
+ updateActiveWindowCaption(doc->DocName);
+}
+
void ScribusMainWindow::manageMasterPages(QString temp)
{
if (HaveDoc)
Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Sun Apr 1 14:47:05 2012
@@ -284,6 +284,8 @@
void editSelectedSymbolStart();
void editSymbolStart(QString temp);
void editSymbolEnd();
+ void editInlineStart(int id);
+ void editInlineEnd();
void manageMasterPages(QString temp = "");
void manageMasterPagesEnd();
/** \brief generate a new document in the current view */
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun Apr 1 14:47:05 2012
@@ -6076,6 +6076,144 @@
}
}
+void ScribusDoc::setInlineEditMode(bool mode, int id)
+{
+ if (mode == m_inlineEditMode)
+ return;
+ m_inlineEditMode = mode;
+ if (mode)
+ {
+ m_storedLayerID = activeLayer();
+ m_storedLayerLock = layerLocked(0);
+ m_storedLayerVis = layerVisible(0);
+ setActiveLayer(0);
+ setLayerVisible(0, true);
+ setLayerLocked(0, false);
+ PageItem *pa = FrameItems[id];
+ pa->isEmbedded = false;
+ currentEditedIFrame = id;
+ ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.Left, docPrefsData.displayPrefs.scratch.Top, pa->visualWidth(), pa->visualHeight());
+ addedPage->setDocument(this);
+ addedPage->Margins.Top = 0;
+ addedPage->Margins.Bottom = 0;
+ addedPage->Margins.Left = 0;
+ addedPage->Margins.Right = 0;
+ addedPage->initialMargins.Top = 0;
+ addedPage->initialMargins.Bottom = 0;
+ addedPage->initialMargins.Left = 0;
+ addedPage->initialMargins.Right = 0;
+ addedPage->setPageNr(0);
+ addedPage->MPageNam = "";
+ addedPage->setPageName("");
+ TempPages.clear();
+ TempPages.append(addedPage);
+ Pages = &TempPages;
+ EditFrameItems.clear();
+ EditFrameItems.append(pa);
+ Items = &EditFrameItems;
+ m_Selection->delaySignalsOn();
+ for (int as = 0; as < Items->count(); ++as)
+ {
+ m_Selection->addItem(Items->at(as));
+ }
+ moveGroup(addedPage->xOffset(), addedPage->yOffset());
+ if (Items->at(0)->isGroup())
+ Items->at(0)->asGroupFrame()->adjustXYPosition();
+ m_Selection->clear();
+ m_Selection->delaySignalsOff();
+ m_ScMW->changeLayer(0);
+ changed();
+ }
+ else
+ {
+ PageItem* currItem = Items->at(0);
+ ScPage* addedPage = TempPages.at(0);
+ if (Items->count() > 1)
+ {
+ if ((!currItem->isGroup()) && (Items->count() > 1))
+ {
+ itemAdd(PageItem::Group, PageItem::Rectangle, addedPage->xOffset(), addedPage->yOffset(), 10, 10, 0, CommonStrings::None, CommonStrings::None, true);
+ PageItem *groupItem = Items->takeLast();
+ groupItem->setLayer(0);
+ Items->insert(0, groupItem);
+ double minx = std::numeric_limits<double>::max();
+ double miny = std::numeric_limits<double>::max();
+ double maxx = -std::numeric_limits<double>::max();
+ double maxy = -std::numeric_limits<double>::max();
+ for (int as = 1; as < Items->count(); ++as)
+ {
+ PageItem* currItem = Items->at(as);
+ groupItem->groupItemList.append(currItem);
+ double x1, x2, y1, y2;
+ currItem->getVisualBoundingRect(&x1, &y1, &x2, &y2);
+ minx = qMin(minx, x1);
+ miny = qMin(miny, y1);
+ maxx = qMax(maxx, x2);
+ maxy = qMax(maxy, y2);
+ }
+ Items->clear();
+ Items->append(groupItem);
+ for (int em = 0; em < groupItem->groupItemList.count(); ++em)
+ {
+ PageItem* currItem = groupItem->groupItemList.at(em);
+ currItem->gXpos = currItem->xPos() - minx;
+ currItem->gYpos = currItem->yPos() - miny;
+ currItem->gWidth = maxx - minx;
+ currItem->gHeight = maxy - miny;
+ }
+ groupItem->setXYPos(minx, miny, true);
+ groupItem->setWidthHeight(maxx - minx, maxy - miny, true);
+ groupItem->groupWidth = maxx - minx;
+ groupItem->groupHeight = maxy - miny;
+ groupItem->gWidth = maxx - minx;
+ groupItem->gHeight = maxy - miny;
+ groupItem->SetRectFrame();
+ groupItem->ClipEdited = true;
+ groupItem->FrameType = 3;
+ groupItem->setTextFlowMode(PageItem::TextFlowDisabled);
+ groupItem->AutoName = false;
+ groupItem->setFillTransparency(0);
+ groupItem->setLineTransparency(0);
+ groupItem->asGroupFrame()->adjustXYPosition();
+ GroupCounter++;
+ }
+ }
+ currItem = Items->at(0);
+ double minx = std::numeric_limits<double>::max();
+ double miny = std::numeric_limits<double>::max();
+ double maxx = -std::numeric_limits<double>::max();
+ double maxy = -std::numeric_limits<double>::max();
+ double x1, x2, y1, y2;
+ currItem->getVisualBoundingRect(&x1, &y1, &x2, &y2);
+ minx = qMin(minx, x1);
+ miny = qMin(miny, y1);
+ maxx = qMax(maxx, x2);
+ maxy = qMax(maxy, y2);
+ currItem->gXpos = currItem->xPos() - minx;
+ currItem->gYpos = currItem->yPos() - miny;
+ currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
+ currItem->isEmbedded = true;
+ currItem->inlineCharID = currentEditedIFrame;
+ FrameItems[currentEditedIFrame] = currItem;
+ if (masterPageMode())
+ {
+ Pages = &MasterPages;
+ Items = &MasterItems;
+ }
+ else
+ {
+ Pages = &DocPages;
+ Items = &DocItems;
+ }
+ delete addedPage;
+ EditFrameItems.clear();
+ setActiveLayer(m_storedLayerID);
+ setLayerVisible(0, m_storedLayerVis);
+ setLayerLocked(0, m_storedLayerLock);
+ m_ScMW->changeLayer(m_storedLayerID);
+ }
+}
+
void ScribusDoc::addSection(const int number, const QString& name, const uint fromindex, const uint toindex, const DocumentSectionType type, const uint sectionstartindex, const bool reversed, const bool active, const QChar fillChar, int fieldWidth)
{
struct DocumentSection newSection;
@@ -15086,6 +15224,8 @@
fIndex = qrand();
}
item->inlineCharID = fIndex;
+ double lw = item->visualLineWidth() / 2.0;
+ item->setXYPos(lw, lw, true);
FrameItems.insert(fIndex, item);
return fIndex;
}
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sun Apr 1 14:47:05 2012
@@ -900,6 +900,13 @@
/*** get the name of the symbol currently in editing */
QString getEditedSymbol() const { return currentEditedSymbol; }
+ /**
+ * @brief Set the doc into inline edit mode
+ */
+ void setInlineEditMode(bool mode, int id = -1);
+
+ /*** Is the document in symbol edit mode? */
+ bool inlineEditMode() const { return m_inlineEditMode; }
/**
* @brief Add a section to the document sections list
@@ -1150,6 +1157,7 @@
bool automaticTextFrames; // Flag for automatic Textframes
bool m_masterPageMode;
bool m_symbolEditMode;
+ bool m_inlineEditMode;
int m_storedLayerID;
bool m_storedLayerLock;
bool m_storedLayerVis;
@@ -1159,6 +1167,7 @@
ScGuardedObject<ScribusDoc> m_guardedObject;
Serializer *m_serializer;
QString currentEditedSymbol;
+ int currentEditedIFrame;
public: // Public attributes
bool is12doc; //public for now, it will be removed later
@@ -1190,6 +1199,7 @@
QList<PageItem*> MasterItems;
QList<PageItem*> DocItems;
QHash<int, PageItem*> FrameItems;
+ QList<PageItem*> EditFrameItems;
Selection* const m_Selection;
/** \brief Number of Columns */
double PageSp;
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sun Apr 1 14:47:05 2012
@@ -2642,6 +2642,39 @@
if (Doc->symbolEditMode())
this->requestMode(modeNormal);
Doc->setSymbolEditMode(false);
+ updatesOn(true);
+ Doc->setCurrentPage(Doc->Pages->at(0));
+ pageSelector->setEnabled(true);
+ layerMenu->setEnabled(true);
+ resizeContents(qRound((Doc->maxCanvasCoordinate.x() - Doc->minCanvasCoordinate.x()) * m_canvas->scale()), qRound((Doc->maxCanvasCoordinate.y() - Doc->minCanvasCoordinate.y()) * m_canvas->scale()));
+}
+
+void ScribusView::showInlinePage(int id)
+{
+ Deselect(false);
+ OldScale = m_canvas->scale();
+ if (!Doc->inlineEditMode())
+ this->requestMode(modeNormal);
+ Doc->setInlineEditMode(true, id);
+ Doc->setCurrentPage(Doc->Pages->at(0));
+ pageSelector->setEnabled(false);
+ layerMenu->setEnabled(false);
+ updateOn = false;
+ zoom();
+ oldX = qRound(Doc->currentPage()->xOffset()- 10);
+ oldY = qRound(Doc->currentPage()->yOffset()- 10);
+ SetCPo(Doc->currentPage()->xOffset() - 10, Doc->currentPage()->yOffset() - 10);
+ updateOn = true;
+ DrawNew();
+}
+
+void ScribusView::hideInlinePage()
+{
+ updatesOn(false);
+ Deselect(true);
+ if (Doc->inlineEditMode())
+ this->requestMode(modeNormal);
+ Doc->setInlineEditMode(false);
updatesOn(true);
Doc->setCurrentPage(Doc->Pages->at(0));
pageSelector->setEnabled(true);
Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h (original)
+++ trunk/Scribus/scribus/scribusview.h Sun Apr 1 14:47:05 2012
@@ -183,6 +183,8 @@
void hideMasterPage();
void showSymbolPage(QString symbolName);
void hideSymbolPage();
+ void showInlinePage(int id);
+ void hideInlinePage();
QImage PageToPixmap(int Nr, int maxGr, bool drawFrame = true);
QImage MPageToPixmap(QString name, int maxGr, bool drawFrame = true);
void RecalcPicturesRes();
Modified: trunk/Scribus/scribus/ui/inlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/ui/inlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/inlinepalette.cpp Sun Apr 1 14:47:05 2012
@@ -77,7 +77,7 @@
{
QMimeData *mimeData = new QMimeData;
QByteArray data = currentItem()->text().toLocal8Bit();
- mimeData->setData("text/symbol", data);
+ mimeData->setData("text/inline", data);
QDrag *drag = new QDrag(this);
drag->setMimeData(mimeData);
drag->setPixmap(currentItem()->icon().pixmap(48, 48));
@@ -96,7 +96,6 @@
unsetDoc();
m_scMW = NULL;
- editItemNames.clear();
languageChange();
connect(InlineViewWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
}
@@ -104,23 +103,21 @@
void InlinePalette::handleDoubleClick(QListWidgetItem *item)
{
if (item)
- emit startEdit(item->text());
+ emit startEdit(item->data(Qt::UserRole).toInt());
}
-void InlinePalette::editingStart(QStringList names)
+void InlinePalette::editingStart()
{
- editItemNames = names;
- for (int a = 0; a < editItemNames.count(); a++)
+ for (int a = 0; a < InlineViewWidget->count(); a++)
{
- QList<QListWidgetItem*> items = InlineViewWidget->findItems(names[a], Qt::MatchExactly);
- if (items.count() > 0)
- items[0]->setFlags(0);
+ QListWidgetItem* item = InlineViewWidget->item(a);
+ if (item)
+ item->setFlags(0);
}
}
void InlinePalette::editingFinished()
{
- editItemNames.clear();
updateItemList();
}
@@ -175,10 +172,8 @@
p.drawPixmap(25 - pm.width() / 2, 25 - pm.height() / 2, pm);
p.end();
QListWidgetItem *item = new QListWidgetItem(pm2, currItem->itemName(), InlineViewWidget);
- if (editItemNames.contains(currItem->itemName()))
- item->setFlags(0);
- else
- item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled);
+ item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled);
+ item->setData(Qt::UserRole, currItem->inlineCharID);
}
}
Modified: trunk/Scribus/scribus/ui/inlinepalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/ui/inlinepalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.h (original)
+++ trunk/Scribus/scribus/ui/inlinepalette.h Sun Apr 1 14:47:05 2012
@@ -74,7 +74,7 @@
void setMainWindow(ScribusMainWindow *mw);
void setDoc(ScribusDoc *);
void unsetDoc();
- void editingStart(QStringList names);
+ void editingStart();
void editingFinished();
void updateItemList();
@@ -86,7 +86,7 @@
void languageChange();
signals:
- void startEdit(QString);
+ void startEdit(int);
void endEdit();
protected:
@@ -94,7 +94,6 @@
QVBoxLayout* PaletteLayout;
ScribusDoc *currDoc;
ScribusMainWindow *m_scMW;
- QStringList editItemNames;
};
#endif
Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17410&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp Sun Apr 1 14:47:05 2012
@@ -999,7 +999,7 @@
freeObjects = 0;
PageItem* pgItem;
QString tmp;
- if (currDoc->symbolEditMode())
+ if (currDoc->symbolEditMode() || currDoc->inlineEditMode())
{
OutlineTreeItem *page = new OutlineTreeItem( item, pagep );
page->PageObject = currDoc->Pages->at(0);
@@ -1033,7 +1033,10 @@
parseSubGroup(object, &pgItem->groupItemList, 3, currDoc->Pages->at(0));
}
}
- page->setText(0, currDoc->getEditedSymbol());
+ if (currDoc->symbolEditMode())
+ page->setText(0, currDoc->getEditedSymbol());
+ else
+ page->setText(0, tr("Inline Frame"));
}
else
{
More information about the scribus-commit
mailing list