]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiGraphics.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiGraphics.cpp
index 953f8e1247991e888185dc5d05c3e93a6b4b7ca4..e89bd4cfe6467e0e050ea0d0c88df64609a2b07a 100644 (file)
@@ -469,14 +469,6 @@ void GuiGraphics::on_angle_textChanged(const QString & filename)
                                 (filename != "0"));
 }
 
-// returns the number of the string s in the vector v
-static int itemNumber(const vector<string> & v, string const & s)
-{
-       vector<string>::const_iterator cit =
-                   find(v.begin(), v.end(), s);
-       return (cit != v.end()) ? int(cit - v.begin()) : 0;
-}
-
 
 void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
 {
@@ -489,7 +481,7 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
        rtXunit->clear();
        rtYunit->clear();
        
-       for (int i = 0; i < bb_size; i++) {
+       for (size_t i = 0; i < bb_size; i++) {
                lbXunit->addItem(qt_(bb_units_gui[i]),
                        toqstr(bb_units[i]));
                lbYunit->addItem(qt_(bb_units_gui[i]),
@@ -634,7 +626,7 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
 
        origin->clear();
 
-       for (int i = 0; i < rorigin_size; i++) {
+       for (size_t i = 0; i < rorigin_size; i++) {
                origin->addItem(qt_(rorigin_gui_strs[i]),
                        toqstr(rorigin_lyx_strs[i]));
        }
@@ -646,6 +638,8 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
 
        // latex section
        latexoptions->setText(toqstr(igp.special));
+       // cf bug #3852
+       filename->setFocus();
 }