r19641 by craig - #11938: Fix edit paste for table edit mode

scribus-commit scribus-commit at lists.scribus.net
Wed Nov 26 21:05:09 UTC 2014


Author: craig
Date: Wed Nov 26 21:05:09 2014
New Revision: 19641

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19641
Log:
#11938: Fix edit paste for table edit mode

Modified:
    trunk/Scribus/scribus/appmodehelper.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19641&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Wed Nov 26 21:05:09 2014
@@ -363,6 +363,12 @@
 					PageItem *i2 = currItem->asTable()->activeCell().textFrame();
 					enableTextActions(true, i2->currentCharStyle().font().scName());
 					a_actMgr->saveActionShortcutsPreEditMode();
+					// #11938: Paste is not correctly enabled in modeEditTable
+					if (ScMimeData::clipboardHasScribusData())
+					{
+						bool tableEditMode = ((currItem != NULL) && (currItem->asTable()));
+						(*a_scrActions)["editPaste"]->setEnabled(tableEditMode);
+					}
 				}
 			}
 			break;

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19641&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Wed Nov 26 21:05:09 2014
@@ -880,9 +880,9 @@
 		{
 			for (int pos=0; pos < itemText.length(); ++pos)
 			{
-                if (itemText.hasMark(pos))
+				if (itemText.hasMark(pos))
 				{
-                    Mark* mrk = itemText.mark(pos);
+					Mark* mrk = itemText.mark(pos);
 					if (!mrk->isType(MARKBullNumType))
 						m_Doc->eraseMark(mrk);
 				}

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19641&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Nov 26 21:05:09 2014
@@ -4963,14 +4963,16 @@
 void ScribusMainWindow::ClipChange()
 {
 	bool textFrameEditMode = false;
+	bool tableEditMode = false;
 	bool hasScribusData = ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment();
 	if (HaveDoc && !doc->m_Selection->isEmpty())
 	{
 		PageItem *currItem = NULL;
 		currItem = doc->m_Selection->itemAt(0);
 		textFrameEditMode  = ((doc->appMode == modeEdit) && (currItem->asTextFrame()));
-	}
-	scrActions["editPaste"]->setEnabled(HaveDoc && (hasScribusData || textFrameEditMode));
+		tableEditMode = ((doc->appMode == modeEditTable) && (currItem->asTable()));
+	}
+	scrActions["editPaste"]->setEnabled(HaveDoc && (hasScribusData || textFrameEditMode || tableEditMode));
 }
 
 void ScribusMainWindow::EnableTxEdit()




More information about the scribus-commit mailing list