]> git.lyx.org Git - features.git/commitdiff
Refactorization: I don't like nested ?: constructions. Especially not followed by...
authorVincent van Ravesteijn <vfr@lyx.org>
Mon, 29 Mar 2010 15:32:45 +0000 (15:32 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 29 Mar 2010 15:32:45 +0000 (15:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33910 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index c12e4c1a0a3187f9c2261a9235b251c1e35f0e46..0d5b76a61482d1284b18502ef258c39a0acd0c70 100644 (file)
@@ -2047,10 +2047,12 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
 void BufferView::lfunScroll(FuncRequest const & cmd)
 {
        string const scroll_type = cmd.getArg(0);
-       int const scroll_step = 
-               (scroll_type == "line") ? d->scrollbarParameters_.single_step
-               : (scroll_type == "page") ? d->scrollbarParameters_.page_step : 0;
-       if (scroll_step == 0)
+       int scroll_step = 0;
+       if (scroll_type == "line")
+               scroll_step = d->scrollbarParameters_.single_step;
+       else if (scroll_type == "page")
+               scroll_step = d->scrollbarParameters_.page_step;
+       else
                return;
        string const scroll_quantity = cmd.getArg(1);
        if (scroll_quantity == "up")