mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +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; }
|
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;
|
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) {
|
if (cmd.origin() == FuncRequest::TOC) {
|
||||||
GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
|
GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
|
||||||
// FIXME: do we need to pass a DispatchResult object here?
|
toc->doDispatch(bv->cursor(), cmd, dr);
|
||||||
toc->doDispatch(bv->cursor(), cmd);
|
|
||||||
return;
|
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();
|
Inset * inset = itemInset();
|
||||||
@ -195,6 +196,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
|
|||||||
case LFUN_CHANGE_REJECT:
|
case LFUN_CHANGE_REJECT:
|
||||||
dispatch(item.action());
|
dispatch(item.action());
|
||||||
cur.dispatch(tmpcmd);
|
cur.dispatch(tmpcmd);
|
||||||
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_SECTION_SELECT:
|
case LFUN_SECTION_SELECT:
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
/// Initialise GUI.
|
/// Initialise GUI.
|
||||||
void init(QString const & str);
|
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
|
///send request to lyx::dispatch with proper guiview handle
|
||||||
///(if ToC is detached current_view can be different window)
|
///(if ToC is detached current_view can be different window)
|
||||||
void sendDispatch(FuncRequest fr);
|
void sendDispatch(FuncRequest fr);
|
||||||
|
Loading…
Reference in New Issue
Block a user