r23301 by jghali - #15882: Truncate action is active for image frames

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 29 12:55:34 UTC 2019


Author: jghali
Date: Tue Oct 29 12:55:34 2019
New Revision: 23301

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23301
Log:
#15882: Truncate action is active for image frames

Modified:
    trunk/Scribus/scribus/appmodehelper.cpp

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23301&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp	(original)
+++ trunk/Scribus/scribus/appmodehelper.cpp	Tue Oct 29 12:55:34 2019
@@ -218,7 +218,7 @@
 				(*a_scrActions)["editCopy"]->setEnabled(currItem != nullptr);
 				(*a_scrActions)["editClearContents"]->setEnabled(currItem != nullptr);
 				(*a_scrActions)["editPaste"]->setEnabled(ScMimeData::clipboardHasScribusData());
-				(*a_scrActions)["editTruncateContents"]->setEnabled(currItem != nullptr);
+				(*a_scrActions)["editTruncateContents"]->setEnabled((currItem != nullptr) && currItem->isTextFrame());
 
 				scmw->propertiesPalette->setGradientEditMode(false);
 				scmw->outlinePalette->setEnabled(true);
@@ -299,7 +299,7 @@
 					(*a_scrActions)["editCut"]->setEnabled(currItem->HasSel);
 					(*a_scrActions)["editCopy"]->setEnabled(currItem->HasSel);
 					(*a_scrActions)["editClearContents"]->setEnabled(currItem->HasSel);
-					(*a_scrActions)["editTruncateContents"]->setEnabled(currItem->HasSel);
+					(*a_scrActions)["editTruncateContents"]->setEnabled(currItem->HasSel && currItem->isTextFrame());
 					(*a_scrActions)["editSearchReplace"]->setEnabled(true);
 				}
 			}
@@ -537,7 +537,7 @@
 			(*a_scrActions)["editCut"]->setEnabled(!inAnEditMode);
 			(*a_scrActions)["editCopy"]->setEnabled(!inAnEditMode);
 			(*a_scrActions)["editClearContents"]->setEnabled(true);
-			(*a_scrActions)["editTruncateContents"]->setEnabled(true);
+			(*a_scrActions)["editTruncateContents"]->setEnabled(false);
 			(*a_scrActions)["editSearchReplace"]->setEnabled(false);
 			(*a_scrActions)["extrasHyphenateText"]->setEnabled(false);
 			(*a_scrActions)["extrasDeHyphenateText"]->setEnabled(false);




More information about the scribus-commit mailing list