[qet] [1177] Merged trunk into 0.3 branch: rev1057 to rev1065

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1177
Author:   xavier
Date:     2011-03-01 23:52:11 +0100 (Tue, 01 Mar 2011)
Log Message:
-----------
Merged trunk into 0.3 branch: rev1057 to rev1065

Modified Paths:
--------------
    branches/0.3/sources/diagramprintdialog.cpp

Property Changed:
----------------
    branches/0.3/
    branches/0.3/elements/appareils_de_mesure/
    branches/0.3/elements/protections/disjoncteurs/disjoncteur4.elmt
    branches/0.3/qelectrotech.pro
    branches/0.3/sources/
    branches/0.3/sources/aboutqet.cpp

Property changes on: branches/0.3
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:840-853,856-1002,1052
   + /trunk:840-853,856-1002,1052,1065


Property changes on: branches/0.3/elements/appareils_de_mesure
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/elements/appareils_de_mesure:1052
   + /trunk/elements/appareils_de_mesure:1052,1065


Property changes on: branches/0.3/elements/protections/disjoncteurs/disjoncteur4.elmt
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/elements/protections/disjoncteurs/disjoncteur4.elmt:840-853,856-1002,1052,1057
   + /trunk/elements/protections/disjoncteurs/disjoncteur4.elmt:840-853,856-1002,1052,1057,1065


Property changes on: branches/0.3/qelectrotech.pro
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/qelectrotech.pro:840-853,856-1002,1052,1057
   + /trunk/qelectrotech.pro:840-853,856-1002,1052,1057,1065


Property changes on: branches/0.3/sources
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/sources:833-853,856-1002,1052
   + /trunk/sources:833-853,856-1002,1052,1065


Property changes on: branches/0.3/sources/aboutqet.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/sources/aboutqet.cpp:833-853,856-1002,1052,1057
   + /trunk/sources/aboutqet.cpp:833-853,856-1002,1052,1057,1065

Modified: branches/0.3/sources/diagramprintdialog.cpp
===================================================================
--- branches/0.3/sources/diagramprintdialog.cpp	2011-03-01 22:47:13 UTC (rev 1176)
+++ branches/0.3/sources/diagramprintdialog.cpp	2011-03-01 22:52:11 UTC (rev 1177)
@@ -382,6 +382,20 @@
 	QList<QGraphicsItem *> selected_elmts = diagram -> selectedItems();
 	foreach (QGraphicsItem *qgi, selected_elmts) qgi -> setSelected(false);
 	
+	// enleve le flag focusable de tous les elements concernes pour eviter toute reprise de focus par un champ de texte editable
+	QList<QGraphicsItem *> focusable_items;
+	foreach (QGraphicsItem *qgi, diagram -> items()) {
+		if (qgi -> flags() & QGraphicsItem::ItemIsFocusable) {
+			focusable_items << qgi;
+			qgi -> setFlag(QGraphicsItem::ItemIsFocusable, false);
+		}
+	}
+	
+	// evite toute autre forme d'interaction
+	foreach (QGraphicsView *view, diagram -> views()) {
+		view -> setInteractive(false);
+	}
+	
 	if (fit_page) {
 		// impression adaptee sur une seule page
 		diagram -> render(qp, QRectF(), diagramRect(diagram), Qt::KeepAspectRatio);
@@ -446,6 +460,16 @@
 		}
 	}
 	
+	// remet en place les interactions
+	foreach (QGraphicsView *view, diagram -> views()) {
+		view -> setInteractive(true);
+	}
+	
+	// restaure les flags focusable
+	foreach (QGraphicsItem *qgi, focusable_items) {
+		qgi -> setFlag(QGraphicsItem::ItemIsFocusable, true);
+	}
+	
 	// restaure les elements selectionnes
 	foreach (QGraphicsItem *qgi, selected_elmts) qgi -> setSelected(true);
 	


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/