r19364 by jghali - #12549: "Add Nodes" crashes Scribus in determined condition
scribus-commit
scribus-commit at lists.scribus.net
Wed Jul 23 11:55:04 UTC 2014
Author: jghali
Date: Wed Jul 23 11:55:04 2014
New Revision: 19364
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19364
Log:
#12549: "Add Nodes" crashes Scribus in determined condition
Modified:
branches/Version14x/Scribus/scribus/scribus.cpp
Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19364&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Wed Jul 23 11:55:04 2014
@@ -6335,6 +6335,7 @@
connect(view, SIGNAL(PolyStatus(int, uint)), nodePalette, SLOT(PolyStatus(int, uint)));
doc->nodeEdit.reset();
//done elsewhere now doc->appMode = modeEditClip;
+ scrActions["insertFrame"]->setEnabled(false);
scrActions["toolsSelect"]->setEnabled(false);
scrActions["toolsRotate"]->setEnabled(false);
scrActions["toolsEditContents"]->setEnabled(false);
@@ -6413,6 +6414,7 @@
nodePalette->setDoc(0,0);
nodePalette->hide();
// qDebug() << "nodepalette hide";
+ scrActions["insertFrame"]->setEnabled(true);
scrActions["toolsSelect"]->setEnabled(true);
scrActions["toolsSelect"]->setChecked(true);
scrActions["toolsRotate"]->setEnabled(true);
@@ -9713,19 +9715,21 @@
void ScribusMainWindow::slotInsertFrame()
{
- if (HaveDoc)
- {
- if (doc->m_Selection->count() != 0)
- view->Deselect(false);
- InsertAFrame *dia = new InsertAFrame(this, doc);
- if (dia->exec())
- {
- InsertAFrameData iafData;
- dia->getNewFrameProperties(iafData);
- doc->itemAddUserFrame(iafData);
- }
- delete dia;
- }
+ if (!HaveDoc)
+ return;
+
+ view->requestMode(modeNormal);
+ if (doc->m_Selection->count() != 0)
+ view->Deselect(false);
+
+ InsertAFrame *dia = new InsertAFrame(this, doc);
+ if (dia->exec())
+ {
+ InsertAFrameData iafData;
+ dia->getNewFrameProperties(iafData);
+ doc->itemAddUserFrame(iafData);
+ }
+ delete dia;
}
void ScribusMainWindow::PutToPatterns()
More information about the scribus-commit
mailing list