mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
update layout choice properly (bug 975)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6563 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3095e8a7b4
commit
a4d63e9e79
@ -111,7 +111,7 @@ BufferView::Pimpl::Pimpl(BufferView * bv, LyXView * owner,
|
||||
resizecon = workarea().workAreaResize
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaResize, this));
|
||||
dispatchcon = workarea().dispatch
|
||||
.connect(boost::bind(&BufferView::Pimpl::dispatch, this, _1));
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaDispatch, this, _1));
|
||||
kpresscon = workarea().workAreaKeyPress
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaKeyPress, this, _1, _2));
|
||||
selectioncon = workarea().selectionRequested
|
||||
@ -914,6 +914,23 @@ void BufferView::Pimpl::trackChanges()
|
||||
}
|
||||
|
||||
|
||||
// Doesn't go through lyxfunc, so we need to update the
|
||||
// layout choice etc. ourselves
|
||||
bool BufferView::Pimpl::workAreaDispatch(FuncRequest const & ev_in)
|
||||
{
|
||||
// e.g. Qt mouse press when no buffer
|
||||
if (!available())
|
||||
return false;
|
||||
|
||||
bool const res = dispatch(ev_in);
|
||||
|
||||
bv_->owner()->updateLayoutChoice();
|
||||
bv_->fitCursor();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
|
||||
{
|
||||
// Make sure that the cached BufferView is correct.
|
||||
@ -928,10 +945,6 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
|
||||
<< " button[" << ev.button() << ']'
|
||||
<< endl;
|
||||
|
||||
// e.g. Qt mouse press when no buffer
|
||||
if (!buffer_)
|
||||
return false;
|
||||
|
||||
LyXTextClass const & tclass = buffer_->params.getLyXTextClass();
|
||||
|
||||
switch (ev.action) {
|
||||
|
@ -102,7 +102,9 @@ struct BufferView::Pimpl : public boost::signals::trackable {
|
||||
bool insertInset(Inset * inset, string const & lout = string());
|
||||
///
|
||||
void updateInset(Inset * inset);
|
||||
///
|
||||
/// a function should be executed from the workarea
|
||||
bool workAreaDispatch(FuncRequest const & ev);
|
||||
/// a function should be executed
|
||||
bool dispatch(FuncRequest const & ev);
|
||||
private:
|
||||
/// track changes for the document
|
||||
|
@ -1,3 +1,9 @@
|
||||
2003-03-24 John Levon <levon@movementarian.org>
|
||||
|
||||
* BufferView_pimpl.h:
|
||||
* BufferView_pimpl.C: update layout choice on a mouse
|
||||
press/release
|
||||
|
||||
2003-03-23 John Levon <levon@movementarian.org>
|
||||
|
||||
* Makefile.am: fix commandtags.h reference
|
||||
|
Loading…
Reference in New Issue
Block a user