[qet] [3496] Fix crash : When remove a diagram from project, close project, and open a project, Qet crash. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3496
Author: blacksun
Date: 2014-11-17 00:24:30 +0100 (Mon, 17 Nov 2014)
Log Message:
-----------
Fix crash : When remove a diagram from project, close project, and open a project, Qet crash.
Modified Paths:
--------------
trunk/sources/projectview.cpp
trunk/sources/projectview.h
trunk/sources/qetdiagrameditor.cpp
trunk/sources/qetdiagrameditor.h
Modified: trunk/sources/projectview.cpp
===================================================================
--- trunk/sources/projectview.cpp 2014-11-16 20:55:39 UTC (rev 3495)
+++ trunk/sources/projectview.cpp 2014-11-16 23:24:30 UTC (rev 3496)
@@ -388,9 +388,6 @@
}
}
- // notifie le reste du monde que le DiagramView va disparaitre
- emit(diagramAboutToBeRemoved(diagram_view));
-
// enleve le DiagramView des onglets
int diagram_tab_id = diagram_ids_.key(diagram_view);
tabs_ -> removeTab(diagram_tab_id);
Modified: trunk/sources/projectview.h
===================================================================
--- trunk/sources/projectview.h 2014-11-16 20:55:39 UTC (rev 3495)
+++ trunk/sources/projectview.h 2014-11-16 23:24:30 UTC (rev 3496)
@@ -88,7 +88,6 @@
signals:
void diagramAdded(DiagramView *);
- void diagramAboutToBeRemoved(DiagramView *);
void diagramRemoved(DiagramView *);
void diagramActivated(DiagramView *);
void diagramOrderChanged(ProjectView *, int, int);
Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp 2014-11-16 20:55:39 UTC (rev 3495)
+++ trunk/sources/qetdiagrameditor.cpp 2014-11-16 23:24:30 UTC (rev 3496)
@@ -1314,7 +1314,6 @@
// gere l'ajout et le retrait de schema du projet
connect(project_view, SIGNAL(diagramAdded(DiagramView *)), this, SLOT(diagramWasAdded(DiagramView *)));
connect(project_view, SIGNAL(diagramAdded(DiagramView *)), this, SLOT(slot_updateActions()));
- connect(project_view, SIGNAL(diagramAboutToBeRemoved(DiagramView *)), this, SLOT(diagramIsAboutToBeRemoved(DiagramView *)));
connect(project_view, SIGNAL(diagramRemoved(DiagramView *)), this, SLOT(diagramWasRemoved(DiagramView *)));
connect(project_view, SIGNAL(diagramRemoved(DiagramView *)), this, SLOT(slot_updateActions()));
if (QETProject *project = project_view -> project()) {
@@ -1861,15 +1860,6 @@
}
/**
- Gere le retrait d'un schema dans un projet avant que le retrait ne soit effectif
- @param dv DiagramView concerne
-*/
-void QETDiagramEditor::diagramIsAboutToBeRemoved(DiagramView *dv) {
- undo_group.removeStack(&(dv -> diagram() -> undoStack()));
- can_update_actions = false;
-}
-
-/**
Gere le retrait d'un schema dans un projet apres que le retrait soit effectif
@param dv DiagramView concerne
*/
Modified: trunk/sources/qetdiagrameditor.h
===================================================================
--- trunk/sources/qetdiagrameditor.h 2014-11-16 20:55:39 UTC (rev 3495)
+++ trunk/sources/qetdiagrameditor.h 2014-11-16 23:24:30 UTC (rev 3496)
@@ -149,7 +149,6 @@
void cleanCurrentProject();
void nomenclatureProject();
void diagramWasAdded(DiagramView *);
- void diagramIsAboutToBeRemoved(DiagramView *);
void diagramWasRemoved(DiagramView *);
void findElementInPanel(const ElementsLocation &);
void findSelectedElementInPanel();