mirror of https://github.com/vitalif/openscad
indentation
parent
e24fb72092
commit
4b45893575
|
@ -178,7 +178,7 @@ MainWindow::MainWindow(const QString &filename)
|
|||
setupUi(this);
|
||||
|
||||
editorDockTitleWidget = new QWidget();
|
||||
consoleDockTitleWidget = new QWidget();
|
||||
consoleDockTitleWidget = new QWidget();
|
||||
|
||||
this->editorDock->setConfigKey("view/hideEditor");
|
||||
this->editorDock->setAction(this->viewActionHideEditor);
|
||||
|
@ -195,11 +195,10 @@ MainWindow::MainWindow(const QString &filename)
|
|||
#ifdef USE_SCINTILLA_EDITOR
|
||||
if (useScintilla) {
|
||||
editor = new ScintillaEditor(editorDockContents);
|
||||
|
||||
}
|
||||
else
|
||||
#endif
|
||||
editor = new LegacyEditor(editorDockContents);
|
||||
editor = new LegacyEditor(editorDockContents);
|
||||
|
||||
Preferences::create(editor->colorSchemes());
|
||||
|
||||
|
@ -783,7 +782,7 @@ void MainWindow::setFileName(const QString &filename)
|
|||
} else {
|
||||
QFileInfo fileinfo(filename);
|
||||
this->fileName = fileinfo.exists() ? fileinfo.absoluteFilePath() : fileinfo.fileName();
|
||||
QString fn =fileinfo.absoluteFilePath();
|
||||
QString fn =fileinfo.absoluteFilePath();
|
||||
setWindowFilePath(fn);
|
||||
|
||||
QDir::setCurrent(fileinfo.dir().absolutePath());
|
||||
|
@ -1247,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