- // check if this is a local layout file
- if (prefixIs(classname, LayoutFileList::localPrefix)) {
- int const ret = Alert::prompt(_("Local layout file"),
- _("The layout file you have selected is a local layout\n"
- "file, not one in the system or user directory. Your\n"
- "document may not work with this layout if you do not\n"
- "keep the layout file in the same directory."),
- 1, 1, _("&Set Layout"), _("&Cancel"));
- if (ret == 1) {
- // try to reset the layout combo
- setLayoutComboByIDString(bp_.baseClassID());
- return;
- }
- } else if (prefixIs(classname, LayoutFileList::embeddedPrefix)) {
- int const ret = Alert::prompt(_("Embedded layout"),
- _("The layout file you have selected is an embedded layout that\n"
- "is embedded to a buffer. You cannot make use of it unless\n"
- "it is already embedded to this buffer.\n"),
- 1, 1, _("&Set Layout"), _("&Cancel"));
- if (ret == 1) {
- setLayoutComboByIDString(bp_.baseClassID());
- return;
- }
- }
- // FIXME Note that by doing things this way, we load the TextClass
- // as soon as it is selected. So, if you use the scroll wheel when
- // sitting on the combo box, we'll load a lot of TextClass objects
- // very quickly. This could be changed.
+
+ // We load the TextClass as soon as it is selected. This is
+ // necessary so that other options in the dialog can be updated
+ // according to the new class. Note, however, that, if you use
+ // the scroll wheel when sitting on the combo box, we'll load a
+ // lot of TextClass objects very quickly....