]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/qt_helpers.cpp
Initialize class members to please coverity
[lyx.git] / src / frontends / qt4 / qt_helpers.cpp
index 92b1187317fa9654cdc8ec1561e35761948639c0..dee6bd4bfed355a9a9a481110f9cfbbdd78c9bb0 100644 (file)
@@ -230,6 +230,15 @@ void setValid(QWidget * widget, bool valid)
        }
 }
 
+
+void focusAndHighlight(QAbstractItemView * w)
+{
+       w->setFocus();
+       w->setCurrentIndex(w->currentIndex());
+       w->scrollTo(w->currentIndex());
+}
+
+
 /// wrapper to hide the change of method name to setSectionResizeMode
 void setSectionResizeMode(QHeaderView * view,
     int logicalIndex, QHeaderView::ResizeMode mode) {