]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormPreferences.C
fix bug 2148 (preferences saves wrong papersizes); also finally dispose dead PAPER_PA...
[lyx.git] / src / frontends / xforms / FormPreferences.C
index 3b4f1f950e6d53f02b20f78d071f6ae3fd393c7f..eb4eb8b66d3bb371c7ddcdb2e05a78a6ff33aa97 100644 (file)
@@ -2064,7 +2064,7 @@ void FormPreferences::OutputsMisc::apply(LyXRC & rc) const
 
        int const choice =
                fl_get_choice(dialog_->choice_default_papersize) - 1;
-       rc.default_papersize = static_cast<PAPER_SIZE>(choice);
+       rc.default_papersize = parent_.controller().toPaperSize(choice);
 
        rc.ascii_roff_command = getString(dialog_->input_ascii_roff);
        rc.chktex_command = getString(dialog_->input_checktex);
@@ -2158,7 +2158,7 @@ void FormPreferences::OutputsMisc::update(LyXRC const & rc)
        fl_set_input(dialog_->input_tex_encoding,
                     rc.fontenc.c_str());
        fl_set_choice(dialog_->choice_default_papersize,
-                     rc.default_papersize + 1);
+                     parent_.controller().fromPaperSize(rc.default_papersize) + 1);
        fl_set_input(dialog_->input_ascii_roff,
                     rc.ascii_roff_command.c_str());
        fl_set_input(dialog_->input_checktex,