]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloatList.cpp
tex2lyx/text.cpp: fix typos
[lyx.git] / src / insets / InsetFloatList.cpp
index f0c649824e6b077e74def8c2ebf68116d37e72e9..5e72ee386fcf30c3921f0f0ae6b352d9f54967fd 100644 (file)
 
 #include "Buffer.h"
 #include "BufferParams.h"
+#include "BufferView.h"
+#include "Cursor.h"
 #include "DispatchResult.h"
 #include "Floating.h"
 #include "FloatList.h"
 #include "Font.h"
+#include "FuncRequest.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
@@ -79,6 +82,21 @@ docstring InsetFloatList::screenLabel() const
 }
 
 
+void InsetFloatList::doDispatch(Cursor & cur, FuncRequest & cmd) {
+       switch (cmd.action()) {
+       case LFUN_MOUSE_RELEASE:
+               if (!cur.selection() && cmd.button() == mouse_button::button1) {
+                       cur.bv().showDialog("toc", params2string(params()));
+                       cur.dispatched();
+               }
+               break;
+       
+       default:
+               InsetCommand::doDispatch(cur, cmd);
+       }
+}
+
+
 void InsetFloatList::write(ostream & os) const
 {
        os << "FloatList " << to_ascii(getParam("type")) << "\n";