diff --git a/sources/editor/elementscene.cpp b/sources/editor/elementscene.cpp index 79f08d10b..9187d5f77 100644 --- a/sources/editor/elementscene.cpp +++ b/sources/editor/elementscene.cpp @@ -779,14 +779,13 @@ void ElementScene::getPasteArea(const QRectF &to_paste) { } /** - Supprime les parties de l'element et les objets d'annulations. - Les autres caracteristiques sont conservees. -*/ + * @brief ElementScene::reset + * Remove all QGraphicsItems in the scene and clear the undo stack. + */ void ElementScene::reset() { - // supprime les objets d'annulation + clearSelection(); undoStack().clear(); - // enleve les elements de la scene foreach (QGraphicsItem *qgi, items()) { removeItem(qgi); qgiManager().release(qgi); diff --git a/sources/editor/qetelementeditor.cpp b/sources/editor/qetelementeditor.cpp index 8052801d0..131babb6b 100644 --- a/sources/editor/qetelementeditor.cpp +++ b/sources/editor/qetelementeditor.cpp @@ -323,7 +323,7 @@ void QETElementEditor::setupActions() { addToolBar(Qt::TopToolBarArea, view_toolbar); addToolBar(Qt::TopToolBarArea, element_toolbar); - connect(ce_scene, SIGNAL(selectionChanged()), this, SLOT(slot_updateInformations())); + connect(ce_scene, SIGNAL(selectionChanged()), this, SLOT(slot_updateInformations()), Qt::QueuedConnection); connect(ce_scene, SIGNAL(selectionChanged()), this, SLOT(slot_updateMenus())); connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slot_updateMenus())); connect(&(ce_scene -> undoStack()), SIGNAL(cleanChanged(bool)), this, SLOT(slot_updateMenus()));