mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Element editor: keyboard shortcuts work again.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2031 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -74,21 +74,6 @@ void ElementView::setScene(ElementScene *s) {
|
||||
scene_ = s;
|
||||
}
|
||||
|
||||
/**
|
||||
Gere les evenements envoyes a la vue.
|
||||
Methode reimplentee pour gerer le conflit de raccourcis avec Suppr
|
||||
(supprimer une partie ou supprimer le caractere suivant)
|
||||
@param e evenement a gerer
|
||||
*/
|
||||
bool ElementView::event(QEvent *e) {
|
||||
if (e -> type() == QEvent::ShortcutOverride && scene_ -> focusItem()) {
|
||||
e -> accept();
|
||||
return(true);
|
||||
}
|
||||
return(QGraphicsView::event(e));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Agrandit le schema (+33% = inverse des -25 % de zoomMoins())
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,6 @@ class ElementView : public QGraphicsView {
|
||||
QRectF viewedSceneRect() const;
|
||||
|
||||
protected:
|
||||
bool event(QEvent *);
|
||||
void mousePressEvent(QMouseEvent *);
|
||||
void wheelEvent(QWheelEvent *);
|
||||
virtual void drawBackground(QPainter *, const QRectF &);
|
||||
|
||||
@@ -541,6 +541,9 @@ void PartText::endEdition() {
|
||||
setTextCursor(qtc);
|
||||
|
||||
setEditable(false);
|
||||
if (decorator_) {
|
||||
decorator_ -> setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QET_DEBUG_EDITOR_TEXTS
|
||||
|
||||
@@ -520,6 +520,9 @@ void PartTextField::endEdition() {
|
||||
setTextCursor(qtc);
|
||||
|
||||
setEditable(false);
|
||||
if (decorator_) {
|
||||
decorator_ -> setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QET_DEBUG_EDITOR_TEXTS
|
||||
|
||||
Reference in New Issue
Block a user