#include "Cursor.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
-#include "LyXFunc.h"
+#include "LyX.h"
#include "LyXRC.h"
#include "Paragraph.h"
#include "TextClass.h"
}
+LayoutBox::~LayoutBox() {
+ delete d;
+}
+
+
void LayoutBox::Private::countCategories()
{
int n = filterModel_->rowCount();
if (!d->text_class_)
return;
+ if (!(*d->text_class_).hasLayout(layout))
+ return;
+
Layout const & lay = (*d->text_class_)[layout];
QString newLayout = toqstr(lay.name());
// find corresponding text class
if (d->text_class_->hasLayout(layoutName)) {
FuncRequest const func(LFUN_LAYOUT, layoutName, FuncRequest::TOOLBAR);
- theLyXFunc().setLyXView(&d->owner_);
lyx::dispatch(func);
updateContents(false);
d->resetFilter();