mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
Fix bug #7176: Clicking TOC doesn't bring up outline
Previously LFUN_INSET_SETTINGS was misused to show the outliner. As a TOC doesn't have settings, it was no longer showed after a refactorization of LFUN_INSET_SETTINGS/LFUN_MOUSE_RELEASE because InsetToc::hasSettings() returns false. As this is a special case, we should handle this special case in InsetTOC itself. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36907 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d82d9d5bfd
commit
b90de3dc5c
@ -14,8 +14,10 @@
|
||||
|
||||
#include "Buffer.h"
|
||||
#include "BufferParams.h"
|
||||
#include "Cursor.h"
|
||||
#include "DispatchResult.h"
|
||||
#include "Font.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "Language.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "OutputParams.h"
|
||||
@ -58,6 +60,21 @@ docstring InsetTOC::screenLabel() const
|
||||
}
|
||||
|
||||
|
||||
void InsetTOC::doDispatch(Cursor & cur, FuncRequest & cmd) {
|
||||
switch (cmd.action()) {
|
||||
case LFUN_MOUSE_RELEASE:
|
||||
if (!cur.selection() && cmd.button() == mouse_button::button1) {
|
||||
showInsetDialog(&cur.bv());
|
||||
cur.dispatched();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
InsetCommand::doDispatch(cur, cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int InsetTOC::plaintext(odocstream & os, OutputParams const &) const
|
||||
{
|
||||
os << screenLabel() << "\n\n";
|
||||
|
@ -39,6 +39,8 @@ public:
|
||||
int docbook(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
docstring xhtml(XHTMLStream & xs, OutputParams const &) const;
|
||||
///
|
||||
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
||||
//@}
|
||||
|
||||
/// \name Static public methods obligated for InsetCommand derived classes
|
||||
|
Loading…
Reference in New Issue
Block a user