[Kst] extragear/graphics/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Tue Aug 16 22:17:10 CEST 2005
SVN commit 449830 by rchern:
Also restore mouse mode when ctrl is held and window loses focus
M +10 -1 kstviewwidget.cpp
M +1 -0 kstviewwidget.h
--- trunk/extragear/graphics/kst/kst/kstviewwidget.cpp #449829:449830
@@ -95,8 +95,17 @@
}
+void KstViewWidget::focusOutEvent(QFocusEvent *e) {
+ if (_view->viewMode() == KstTopLevelView::LayoutMode && _lastViewMode != KstTopLevelView::LayoutMode) {
+ _view->setViewMode(_lastViewMode);
+ _lastViewMode = KstTopLevelView::LayoutMode;
+ }
+ QWidget::focusOutEvent(e);
+}
+
+
void KstViewWidget::leaveEvent(QEvent *e) {
- _lastViewMode = KstTopLevelView::LayoutMode;
+
//kdDebug() << "Leave event" << endl;
QWidget::leaveEvent(e);
if (_view->viewMode() != KstTopLevelView::DisplayMode) {
--- trunk/extragear/graphics/kst/kst/kstviewwidget.h #449829:449830
@@ -59,6 +59,7 @@
virtual void keyPressEvent(QKeyEvent *e);
virtual void keyReleaseEvent(QKeyEvent *e);
virtual void wheelEvent(QWheelEvent *e);
+ virtual void focusOutEvent(QFocusEvent *e);
friend class KstTopLevelView;
void release() { _view = 0L; }
More information about the Kst
mailing list