mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user