Skip to content
Permalink
Browse files

Only highlight feature of active attribute dialog

Fix #13634
  • Loading branch information
m-kuhn committed Oct 23, 2015
1 parent b9b0865 commit 2e8505378ea91424f31be82f2041572fe9950319
Showing with 19 additions and 0 deletions.
  1. +10 −0 src/gui/qgsattributedialog.cpp
  2. +9 −0 src/gui/qgsattributedialog.h
@@ -125,3 +125,13 @@ void QgsAttributeDialog::init( QgsVectorLayer* layer, QgsFeature* feature, const
restoreGeometry();
focusNextChild();
}

bool QgsAttributeDialog::event( QEvent* e )
{
if ( e->type() == QEvent::WindowActivate && mHighlight )
mHighlight->show();
else if ( e->type() == QEvent::WindowDeactivate && mHighlight )
mHighlight->hide();

return QDialog::event( e );
}
@@ -118,6 +118,15 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
*/
void setEditCommandMessage( const QString& message ) { mAttributeForm->setEditCommandMessage( message ); }

/**
* Intercept window activate/deactive events to show/hide the highlighted feature.
*
* @param e The event
*
* @return The same as the parent QDialog
*/
virtual bool event( QEvent *e ) override;

public slots:
void accept() override;

0 comments on commit 2e85053

Please sign in to comment.
You can’t perform that action at this time.