r18074 by fschmid - Fixed Bug #11360: crash when deleting edited inline frame
scribus-commit
scribus-commit at lists.scribus.net
Mon Jan 7 23:19:05 UTC 2013
Author: fschmid
Date: Mon Jan 7 23:19:05 2013
New Revision: 18074
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18074
Log:
Fixed Bug #11360: crash when deleting edited inline frame
its now no longer possible to delete inline frames when editing.
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/ui/inlinepalette.cpp
trunk/Scribus/scribus/ui/inlinepalette.h
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18074&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Jan 7 23:19:05 2013
@@ -8899,7 +8899,7 @@
#endif
pagePalette->enablePalette(false);
layerPalette->setEnabled(false);
- inlinePalette->editingStart();
+ inlinePalette->editingStart(id);
if (outlinePalette->isVisible())
outlinePalette->BuildTree(false);
updateActiveWindowCaption( tr("Editing Inline Frame"));
@@ -9095,8 +9095,11 @@
Apply_MasterPage(doc->DocPages.at(c)->MPageNam, c, false);
pagePalette->endMasterPageMode();
- pagePalette->setVisible(m_pagePalVisible);
- scrActions["toolsPages"]->setChecked(m_pagePalVisible);
+ if (pagePalette->isFloating())
+ {
+ pagePalette->setVisible(m_pagePalVisible);
+ scrActions["toolsPages"]->setChecked(m_pagePalVisible);
+ }
doc->setCurrentPage(doc->DocPages.at(storedPageNum));
doc->minCanvasCoordinate = doc->stored_minCanvasCoordinate;
doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
Modified: trunk/Scribus/scribus/ui/inlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18074&path=/trunk/Scribus/scribus/ui/inlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/inlinepalette.cpp Mon Jan 7 23:19:05 2013
@@ -107,6 +107,7 @@
unsetDoc();
m_scMW = NULL;
+ currentEditedItem = -1;
languageChange();
connect(InlineViewWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
connect(InlineViewWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(handleContextMenue(QPoint)));
@@ -115,6 +116,8 @@
void InlinePalette::handleContextMenue(QPoint p)
{
+ if (currentEditedItem > 0)
+ return;
QListWidgetItem *item = InlineViewWidget->itemAt(p);
if (item)
{
@@ -181,8 +184,9 @@
InlineViewWidget->update();
}
-void InlinePalette::editingStart()
-{
+void InlinePalette::editingStart(int itemID)
+{
+ currentEditedItem = itemID;
for (int a = 0; a < InlineViewWidget->count(); a++)
{
QListWidgetItem* item = InlineViewWidget->item(a);
@@ -194,6 +198,7 @@
void InlinePalette::editingFinished()
{
updateItemList();
+ currentEditedItem = -1;
}
void InlinePalette::setMainWindow(ScribusMainWindow *mw)
Modified: trunk/Scribus/scribus/ui/inlinepalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18074&path=/trunk/Scribus/scribus/ui/inlinepalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.h (original)
+++ trunk/Scribus/scribus/ui/inlinepalette.h Mon Jan 7 23:19:05 2013
@@ -77,7 +77,7 @@
void setMainWindow(ScribusMainWindow *mw);
void setDoc(ScribusDoc *);
void unsetDoc();
- void editingStart();
+ void editingStart(int itemID);
void editingFinished();
void updateItemList();
@@ -103,6 +103,7 @@
ScribusDoc *currDoc;
ScribusMainWindow *m_scMW;
int actItem;
+ int currentEditedItem;
};
#endif
More information about the scribus-commit
mailing list