mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Refactorization: I don't like nested ?: constructions. Especially not followed by an if statement which is a special case for the deepest level of the nested ?: construction.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33910 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6a9f44eaa2
commit
0b450f40e7
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user