mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Improve last comit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4955 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -671,20 +671,30 @@ void QETDiagramEditor::closeEvent(QCloseEvent *qce) {
|
||||
}
|
||||
|
||||
/**
|
||||
Gere les evenements du l'editeur de schema
|
||||
Reimplemente ici pour :
|
||||
* eviter un conflit sur le raccourci clavier "Ctrl+W" (QKeySequence::Close)
|
||||
@param e Evenement
|
||||
*/
|
||||
bool QETDiagramEditor::event(QEvent *e) {
|
||||
if (e -> type() == QEvent::ShortcutOverride) {
|
||||
* @brief QETDiagramEditor::event
|
||||
* Reimplemented to :
|
||||
* -avoid conflic with shortcut "Ctrl+W" (QKeySequence::Close)
|
||||
* -Load elements collection when WindowActivate.
|
||||
* @param e
|
||||
* @return
|
||||
*/
|
||||
bool QETDiagramEditor::event(QEvent *e)
|
||||
{
|
||||
if (e -> type() == QEvent::ShortcutOverride)
|
||||
{
|
||||
QKeyEvent *shortcut_event = static_cast<QKeyEvent *>(e);
|
||||
if (shortcut_event && shortcut_event -> matches(QKeySequence::Close)) {
|
||||
if (shortcut_event && shortcut_event -> matches(QKeySequence::Close))
|
||||
{
|
||||
close_file -> trigger();
|
||||
e -> accept();
|
||||
return(true);
|
||||
}
|
||||
}
|
||||
if (m_first_show && e->type() == QEvent::WindowActivate)
|
||||
{
|
||||
m_first_show = false;
|
||||
QTimer::singleShot(250, m_element_collection_widget, SLOT(reload()));
|
||||
}
|
||||
return(QETMainWindow::event(e));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user