Amelioration de la classe DiagramContent

Modifications pour corriger quelques regressions


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@212 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-11-11 16:12:45 +00:00
parent be6ba77656
commit 4856b3dd7b
6 changed files with 95 additions and 45 deletions

View File

@@ -76,11 +76,6 @@ void DiagramView::selectInvert() {
Supprime les composants selectionnes
*/
void DiagramView::deleteSelection() {
// si un item a le focus et que ce slot est appele, c'est sans doute parce
// que la touche suppr a ete enfoncee pour effacer une lettre et non la
// selection
if (scene -> focusItem()) return;
DiagramContent removed_content = scene -> selectedContent();
scene -> clearSelection();
scene -> undoStack().push(new DeleteElementsCommand(scene, removed_content));
@@ -197,9 +192,9 @@ void DiagramView::zoomReset() {
*/
void DiagramView::cut() {
copy();
DiagramContent removed_content = scene -> selectedContent();
DiagramContent cut_content = scene -> selectedContent();
scene -> clearSelection();
scene -> undoStack().push(new CutDiagramCommand(scene, scene -> selectedContent()));
scene -> undoStack().push(new CutDiagramCommand(scene, cut_content));
}
/**