]> git.lyx.org Git - features.git/commitdiff
Fix function disabling
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 20 Nov 2012 14:48:59 +0000 (15:48 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 20 Nov 2012 14:48:59 +0000 (15:48 +0100)
src/Text3.cpp
src/insets/InsetText.cpp

index 5260053657a6886699cd31a424844e6636654c55..5ec76e3c5e3d7bf253f0a186e50cb36e84dae40a 100644 (file)
@@ -2527,6 +2527,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                Layout::LaTeXArgMap::const_iterator const lait =
                                args.find(convert<unsigned int>(arg));
                if (lait != args.end()) {
+                       enable = true;
                        InsetList::const_iterator it = cur.paragraph().insetList().begin();
                        InsetList::const_iterator end = cur.paragraph().insetList().end();
                        for (; it != end; ++it) {
@@ -2540,7 +2541,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                                        }
                                }
                        }
-                       enable = true;
                } else
                        enable = false;
                break;
index e209e5021505b2cb20b9443c25e2300a4bc235e8..06644ad6579b79c7981c3d3c9b512a115afd51ca 100644 (file)
@@ -344,6 +344,7 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
                Layout::LaTeXArgMap::const_iterator const lait =
                                args.find(convert<unsigned int>(arg));
                if (lait != args.end()) {
+                       status.setEnabled(true);
                        InsetList::const_iterator it = cur.paragraph().insetList().begin();
                        InsetList::const_iterator end = cur.paragraph().insetList().end();
                        for (; it != end; ++it) {
@@ -357,7 +358,6 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
                                        }
                                }
                        }
-                       status.setEnabled(true);
                } else
                        status.setEnabled(false);
                return true;