[qet] [3810] Fix regression from previous comit

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


Revision: 3810
Author:   blacksun
Date:     2015-03-05 14:31:56 +0100 (Thu, 05 Mar 2015)
Log Message:
-----------
Fix regression from previous comit

Modified Paths:
--------------
    trunk/sources/projectview.cpp
    trunk/sources/projectview.h

Modified: trunk/sources/projectview.cpp
===================================================================
--- trunk/sources/projectview.cpp	2015-03-05 13:11:38 UTC (rev 3809)
+++ trunk/sources/projectview.cpp	2015-03-05 13:31:56 UTC (rev 3810)
@@ -29,7 +29,6 @@
 #include "conductorpropertieswidget.h"
 #include "qeticons.h"
 #include "qetmessagebox.h"
-#include "qettabbar.h"
 #include "qettemplateeditor.h"
 #include "diagramfoliolist.h"
 #include "projectpropertiesdialog.h"
@@ -502,6 +501,29 @@
 	moveDiagramDown(findDiagram(diagram));
 }
 
+/*
+ * Deplace le schema diagram_view vers le haut / la gauche en position 0
+ */
+void ProjectView::moveDiagramUpTop(DiagramView *diagram_view)
+{
+	if (!diagram_view) return;
+
+	int diagram_view_position = diagram_ids_.key(diagram_view);
+	if (!diagram_view_position) {
+		// le schema est le premier du projet
+		return;
+	}
+	m_tab -> tabBar() -> moveTab(diagram_view_position, (diagrams().size(), 0));
+}
+
+/*
+ * Deplace le schema diagram vers le haut / la gauche en position 0
+ */
+void ProjectView::moveDiagramUpTop(Diagram *diagram)
+{
+	moveDiagramUpTop(findDiagram(diagram));
+}
+
 /**
 	Deplace le schema diagram_view vers le haut / la gauche x10
 */

Modified: trunk/sources/projectview.h
===================================================================
--- trunk/sources/projectview.h	2015-03-05 13:11:38 UTC (rev 3809)
+++ trunk/sources/projectview.h	2015-03-05 13:31:56 UTC (rev 3810)
@@ -73,6 +73,8 @@
 	void moveDiagramUp(Diagram *);
 	void moveDiagramDown(DiagramView *);
 	void moveDiagramDown(Diagram *);
+	void moveDiagramUpTop(DiagramView *);
+	void moveDiagramUpTop(Diagram *);
 	void moveDiagramUpx10(DiagramView *);
 	void moveDiagramUpx10(Diagram *);
 	void moveDiagramDownx10(DiagramView *);


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