r20232 by jghali - #13193: fix script related to mouse up action being lost when annotation dialog is closed while current script displayed is related to another action

scribus-commit scribus-commit at lists.scribus.net
Fri Jul 3 22:23:25 UTC 2015


Author: jghali
Date: Fri Jul  3 22:23:25 2015
New Revision: 20232

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20232
Log:
#13193: fix script related to mouse up action being lost when annotation dialog is closed while current script displayed is related to another action

Modified:
    branches/Version14x/Scribus/scribus/annot.cpp

Modified: branches/Version14x/Scribus/scribus/annot.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20232&path=/branches/Version14x/Scribus/scribus/annot.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/annot.cpp (original)
+++ branches/Version14x/Scribus/scribus/annot.cpp Fri Jul  3 22:23:25 2015
@@ -1949,16 +1949,16 @@
 				break;
 		}
 	}
-	item->annotation().setAction("");
 	switch (ActionCombo->currentIndex())
-		{
+	{
 		case 0:
 			item->annotation().setActionType(0);
+			item->annotation().setAction(QString());
 			break;
 		case 1:
 			item->annotation().setActionType(1);
 			switch (ScrEdited)
-				{
+			{
 				case 0:
 					item->annotation().setAction(EditJava->toPlainText());
 					break;
@@ -1980,7 +1980,7 @@
 				case 6:
 					item->annotation().setK_act(EditJava->toPlainText());
 					break;
-				}
+			}
 			break;
 		case 2:
 			if ((LExtern->isChecked()) && (!Destfile->text().isEmpty()))
@@ -2007,12 +2007,17 @@
 			break;
 		case 4:
 			item->annotation().setActionType(4);
+			item->annotation().setAction(QString());
 			break;
 		case 5:
 			item->annotation().setActionType(5);
 			item->annotation().setAction(SubURLa->text().simplified());
 			break;
-		}
+		default:
+			item->annotation().setActionType(0);
+			item->annotation().setAction(QString());
+			break;
+	}
 	if (!item->annotation().E_act().isEmpty())
 		AAct = true;
 	if (!item->annotation().X_act().isEmpty())




More information about the scribus-commit mailing list