Texts group can be removed with the delete key of keybord

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5142 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-12-05 21:41:29 +00:00
parent 89c019a10e
commit e8905793cc
7 changed files with 61 additions and 45 deletions

View File

@@ -126,20 +126,6 @@ void DiagramView::selectInvert() {
m_diagram -> invertSelection();
}
/**
* @brief DiagramView::deleteSelection
* Delete the selected items
*/
void DiagramView::deleteSelection()
{
if (m_diagram -> isReadOnly())
return;
DiagramContent removed_content = DiagramContent(m_diagram);
m_diagram->clearSelection();
m_diagram->undoStack().push(new DeleteQGraphicsItemCommand(m_diagram, removed_content));
adjustSceneRect();
}
/**
Accepte ou refuse le drag'n drop en fonction du type de donnees entrant
@param e le QDragEnterEvent correspondant au drag'n drop tente
@@ -750,25 +736,6 @@ bool DiagramView::hasTextItems() {
return(false);
}
/**
* @brief DiagramView::hasDeletableItems
* @return True if a least on of selected item can be deleted
*/
bool DiagramView::hasDeletableItems()
{
for(QGraphicsItem *qgi : m_diagram->selectedItems())
{
if (qgi->type() == Element::Type ||
qgi->type() == Conductor::Type ||
qgi->type() == IndependentTextItem::Type ||
qgi->type() == QetShapeItem::Type ||
qgi->type() == DiagramImageItem::Type ||
qgi->type() == DynamicElementTextItem::Type)
return true;
}
return(false);
}
/**
Ajoute une colonne au schema.
*/