mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
Send a DispatchResult object with dispatch requests to the TOC.
This allows us to request a buffer update.
This commit is contained in:
parent
12bd688139
commit
37c5cae58b
@ -76,9 +76,10 @@ void GuiToc::closeEvent(QCloseEvent * /*event*/)
|
||||
}
|
||||
|
||||
|
||||
void GuiToc::doDispatch(Cursor & cur, FuncRequest const & cmd)
|
||||
void GuiToc::doDispatch(Cursor & cur, FuncRequest const & cmd,
|
||||
DispatchResult & dr)
|
||||
{
|
||||
widget_->doDispatch(cur, cmd);
|
||||
widget_->doDispatch(cur, cmd, dr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
///
|
||||
bool isBufferDependent() const { return true; }
|
||||
///
|
||||
void doDispatch(Cursor & cur, FuncRequest const & fr);
|
||||
void doDispatch(Cursor & cur, FuncRequest const & fr, DispatchResult & dr);
|
||||
///
|
||||
bool getStatus(Cursor & cur, FuncRequest const & fr, FuncStatus & fs) const;
|
||||
|
||||
|
@ -3904,8 +3904,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
|
||||
if (cmd.origin() == FuncRequest::TOC) {
|
||||
GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
|
||||
// FIXME: do we need to pass a DispatchResult object here?
|
||||
toc->doDispatch(bv->cursor(), cmd);
|
||||
toc->doDispatch(bv->cursor(), cmd, dr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,8 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
|
||||
|
||||
void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
|
||||
void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd,
|
||||
DispatchResult & dr)
|
||||
{
|
||||
|
||||
Inset * inset = itemInset();
|
||||
@ -195,6 +196,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
|
||||
case LFUN_CHANGE_REJECT:
|
||||
dispatch(item.action());
|
||||
cur.dispatch(tmpcmd);
|
||||
dr.forceBufferUpdate();
|
||||
break;
|
||||
|
||||
case LFUN_SECTION_SELECT:
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
/// Initialise GUI.
|
||||
void init(QString const & str);
|
||||
///
|
||||
void doDispatch(Cursor & cur, FuncRequest const & fr);
|
||||
void doDispatch(Cursor & cur, FuncRequest const & fr, DispatchResult & dr);
|
||||
///send request to lyx::dispatch with proper guiview handle
|
||||
///(if ToC is detached current_view can be different window)
|
||||
void sendDispatch(FuncRequest fr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user