// cursor is at the top or bottom edge of the viewport. One scroll per 0.2 s
SyntheticMouseEvent::SyntheticMouseEvent()
: timeout(200), restart_timeout(true),
- x_old(-1), y_old(-1), min_scrollbar_old(-1.0), max_scrollbar_old(-1.0)
+ x_old(-1), y_old(-1), min_scrollbar_old(-1), max_scrollbar_old(-1)
{}
void TabWorkArea::closeCurrentBuffer()
{
- if (clicked_tab_ != -1)
- setCurrentIndex(clicked_tab_);
- else
- // Before dispatching the LFUN we should be sure this
- // is the current workarea.
- currentWorkAreaChanged(currentWorkArea());
-
- lyx::dispatch(FuncRequest(LFUN_BUFFER_CLOSE));
+ GuiWorkArea * wa;
+ if (clicked_tab_ == -1)
+ wa = currentWorkArea();
+ else {
+ wa = dynamic_cast<GuiWorkArea *>(widget(clicked_tab_));
+ LASSERT(wa, /**/);
+ }
+ wa->view().closeWorkArea(wa);
}
wa = dynamic_cast<GuiWorkArea *>(widget(clicked_tab_));
LASSERT(wa, /**/);
}
- wa->view().hideBuffer();
+ wa->view().hideWorkArea(wa);
}
///