]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/LyXView.C
Martin's changes to the Note inset.
[lyx.git] / src / frontends / LyXView.C
index 1baa0ce1db392e1271fd8067450504663be84d21..4b00b244fe97370c77a7659088b86a12f712abe4 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <config.h>
 
-
 #include "LyXView.h"
 #include "debug.h"
 #include "intl.h"
@@ -31,6 +30,7 @@
 #include "Timeout.h"
 #include "Menubar.h"
 #include "controllers/ControlCommandBuffer.h"
+#include "mathed/math_cursor.h"
 
 #include "support/filetools.h" // OnlyFilename()
 
@@ -39,6 +39,7 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+using namespace lyx::support;
 using std::endl;
 
 string current_layout;
@@ -96,7 +97,10 @@ void LyXView::setLayout(string const & layout)
 
 void LyXView::updateToolbar()
 {
-       toolbar_->update();
+       bool const math = mathcursor;
+       bool const table =
+               !getLyXFunc().getStatus(LFUN_LAYOUT_TABULAR).disabled();
+       toolbar_->update(math, table);
 }