mirror of https://github.com/vitalif/openscad
indentation
parent
9fd3aa5f17
commit
6e44f62472
|
@ -1246,25 +1246,25 @@ void MainWindow::updateRecentFileActions()
|
|||
|
||||
void MainWindow::show_examples()
|
||||
{
|
||||
bool found_example = false;
|
||||
|
||||
foreach (const QString &cat, UIUtils::exampleCategories()) {
|
||||
bool found_example = false;
|
||||
|
||||
foreach (const QString &cat, UIUtils::exampleCategories()) {
|
||||
QFileInfoList examples = UIUtils::exampleFiles(cat);
|
||||
QMenu *menu = this->menuExamples->addMenu(gettext(cat.toStdString().c_str()));
|
||||
|
||||
foreach(const QFileInfo &ex, examples) {
|
||||
QAction *openAct = new QAction(ex.fileName(), this);
|
||||
connect(openAct, SIGNAL(triggered()), this, SLOT(actionOpenExample()));
|
||||
menu->addAction(openAct);
|
||||
openAct->setData(ex.canonicalFilePath());
|
||||
found_example = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found_example) {
|
||||
delete this->menuExamples;
|
||||
this->menuExamples = NULL;
|
||||
}
|
||||
QMenu *menu = this->menuExamples->addMenu(gettext(cat.toStdString().c_str()));
|
||||
|
||||
foreach(const QFileInfo &ex, examples) {
|
||||
QAction *openAct = new QAction(ex.fileName(), this);
|
||||
connect(openAct, SIGNAL(triggered()), this, SLOT(actionOpenExample()));
|
||||
menu->addAction(openAct);
|
||||
openAct->setData(ex.canonicalFilePath());
|
||||
found_example = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found_example) {
|
||||
delete this->menuExamples;
|
||||
this->menuExamples = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::actionOpenExample()
|
||||
|
|
Loading…
Reference in New Issue