[Kst] extragear/graphics/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Thu Aug 18 23:47:12 CEST 2005
SVN commit 450712 by rchern:
Fix double-clicking in temporary layout mode (ignore releases when double-clicking)
M +7 -1 kstviewwidget.cpp
M +1 -0 kstviewwidget.h
--- trunk/extragear/graphics/kst/kst/kstviewwidget.cpp #450711:450712
@@ -38,6 +38,7 @@
setMinimumSize(40, 25);
_vo_datamode = 0L;
_lastViewMode = KstTopLevelView::LayoutMode;
+ _doubleClicking = false;
}
@@ -228,7 +229,7 @@
void KstViewWidget::mouseDoubleClickEvent(QMouseEvent *e) {
//kdDebug() << "DoubleClick event. button=" << e->button() << " state=" << e->state() << endl;
-
+ _doubleClicking = true;
if (_view->viewMode() == KstTopLevelView::DisplayMode) {
KstViewObjectPtr vo;
if (_view->mouseGrabbed()) {
@@ -275,6 +276,11 @@
void KstViewWidget::mouseReleaseEvent(QMouseEvent *e) {
+ if (_doubleClicking) {
+ e->accept();
+ _doubleClicking = false;
+ return;
+ }
//kdDebug() << "Release event. button=" << e->button() << " state=" << e->state() << endl;
if (_view->viewMode() == KstTopLevelView::DisplayMode) {
KstViewObjectPtr vo;
--- trunk/extragear/graphics/kst/kst/kstviewwidget.h #450711:450712
@@ -73,6 +73,7 @@
KPopupMenu *_menu;
QDragObject *_drag;
KstPaintType _nextUpdate;
+ bool _doubleClicking : 1;
};
#endif
More information about the Kst
mailing list