]> git.lyx.org Git - features.git/commitdiff
Add comment that a code chunk is unnecessary
authorScott Kostyshak <skostysh@lyx.org>
Thu, 21 Jul 2016 23:14:16 +0000 (19:14 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 22 Jul 2016 02:31:29 +0000 (22:31 -0400)
A chunk of code in an event handler seems to be unnecessary to me
because the event that the situation handles never makes it this far
in the event handling hierarchy. I'm not sure why this is, and thus
I'm not sure if this is true in all cases (e.g. Qt version) and if
it will be true in the future so I leave this code for now.

src/frontends/qt4/GuiWorkArea.cpp

index 109ea7eed32fb4acf9498e5d1e309ced3238df1f..e397a80c38c9fb93981e7f462e67f0b2d72a1c46 100644 (file)
@@ -1633,6 +1633,12 @@ void TabWorkArea::mouseDoubleClickEvent(QMouseEvent * event)
        if (event->button() != Qt::LeftButton)
                return;
 
+       // this code chunk is unnecessary because it seems the event only makes
+       // it this far if it is not on a tab. I'm not sure why this is (maybe
+       // it is handled and ended in DragTabBar?), and thus I'm not sure if
+       // this is true in all cases and if it will be true in the future so I
+       // leave this code for now. (skostysh, 2016-07-21)
+       //
        // return early if double click on existing tabs
        for (int i = 0; i < count(); ++i)
                if (tabBar()->tabRect(i).contains(event->pos()))