mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-01 21:45:23 +00:00
Fix class switching bug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1307 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
43772015fd
commit
0691ed7ea9
@ -1,3 +1,8 @@
|
|||||||
|
2001-01-09 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* src/frontends/xforms/FormDocument.C (CheckChoiceClass): fix
|
||||||
|
class switching; do not do anything if class has not been changed.
|
||||||
|
|
||||||
2001-01-07 Dekel Tsur <dekelts@tau.ac.il>
|
2001-01-07 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
* lib/build-listerrors: Exit if literate-article doesn't appear in
|
* lib/build-listerrors: Exit if literate-article doesn't appear in
|
||||||
|
@ -417,6 +417,7 @@ bool FormDocument::class_apply()
|
|||||||
#else
|
#else
|
||||||
unsigned int const new_class = fl_get_choice(class_->choice_doc_class) - 1;
|
unsigned int const new_class = fl_get_choice(class_->choice_doc_class) - 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (params.textclass != new_class) {
|
if (params.textclass != new_class) {
|
||||||
// try to load new_class
|
// try to load new_class
|
||||||
if (textclasslist.Load(new_class)) {
|
if (textclasslist.Load(new_class)) {
|
||||||
@ -1091,10 +1092,13 @@ void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
|
|||||||
string tct = fl_get_choice_text(ob);
|
string tct = fl_get_choice_text(ob);
|
||||||
#endif
|
#endif
|
||||||
if (textclasslist.Load(tc)) {
|
if (textclasslist.Load(tc)) {
|
||||||
if (AskQuestion(_("Should I set some parameters to"), tct,
|
// we use a copy of the bufferparams because we do not
|
||||||
_("the defaults of this document class?"))) {
|
// want to modify them yet.
|
||||||
BufferParams & params = lv_->buffer()->params;
|
BufferParams params = lv_->buffer()->params;
|
||||||
|
|
||||||
|
if (params.textclass != tc
|
||||||
|
&& AskQuestion(_("Should I set some parameters to"),
|
||||||
|
_("the defaults of this document class?"))) {
|
||||||
params.textclass = tc;
|
params.textclass = tc;
|
||||||
params.useClassDefaults();
|
params.useClassDefaults();
|
||||||
UpdateLayoutDocument(params);
|
UpdateLayoutDocument(params);
|
||||||
|
Loading…
Reference in New Issue
Block a user