History

Merge remote-tracking branch 'upstream/master'

Mark Peng committed 13 years ago

Commit 62570f02 parents 0b334f9 790a48b7 files · +883 −192Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+12−8
@@ -1364,8 +1364,10 @@ void Application::exportVoxels() { · 1363 unmodified lines
13641364
13651365 void Application::importVoxels() {
13661366 QString desktopLocation = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
1367− QString fileNameString = QFileDialog::getOpenFileName(_glWidget, tr("Import Voxels"), desktopLocation,
1368− tr("Sparse Voxel Octree Files, Square PNG (*.svo *.png)"));
1367+ QString fileNameString = QFileDialog::getOpenFileName(
1368+ _glWidget, tr("Import Voxels"), desktopLocation,
1369+ tr("Sparse Voxel Octree Files, Square PNG, Schematic Files (*.svo *.png *.schematic)"));
1370+
13691371 QByteArray fileNameAscii = fileNameString.toAscii();
13701372 const char* fileName = fileNameAscii.data();
13711373
@@ -1386,8 +1388,10 @@ void Application::importVoxels() { · 14 unmodified lines
13861388 }
13871389
13881390 importVoxels.readFromSquareARGB32Pixels(pixels, pngImage.height());
1389− } else {
1391+ } else if (fileNameString.endsWith(".svo", Qt::CaseInsensitive)) {
13901392 importVoxels.readFromSVOFile(fileName);
1393+ } else {
1394+ importVoxels.readFromSchematicFile(fileName);
13911395 }
13921396
13931397 VoxelNode* selectedNode = _voxels.getVoxelAt(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s);
@@ -1583,11 +1587,11 @@ void Application::initMenu() { · 189 unmodified lines
15831587 _voxelPaintColor->setIcon(createSwatchIcon(paintColor));
15841588 (_destructiveAddVoxel = voxelMenu->addAction("Create Voxel is Destructive"))->setCheckable(true);
15851589
1586− voxelMenu->addAction("Export Voxels", this, SLOT(exportVoxels()), Qt::CTRL | Qt::Key_E);
1587− voxelMenu->addAction("Import Voxels", this, SLOT(importVoxels()), Qt::CTRL | Qt::Key_I);
1588− voxelMenu->addAction("Cut Voxels", this, SLOT(cutVoxels()), Qt::CTRL | Qt::Key_X);
1589− voxelMenu->addAction("Copy Voxels", this, SLOT(copyVoxels()), Qt::CTRL | Qt::Key_C);
1590− voxelMenu->addAction("Paste Voxels", this, SLOT(pasteVoxels()), Qt::CTRL | Qt::Key_V);
1590+ voxelMenu->addAction("Export Voxels", this, SLOT(exportVoxels()), Qt::CTRL | Qt::Key_E);
1591+ voxelMenu->addAction("Import Voxels", this, SLOT(importVoxels()), Qt::CTRL | Qt::Key_I);
1592+ voxelMenu->addAction("Cut Voxels", this, SLOT(cutVoxels()), Qt::CTRL | Qt::Key_X);
1593+ voxelMenu->addAction("Copy Voxels", this, SLOT(copyVoxels()), Qt::CTRL | Qt::Key_C);
1594+ voxelMenu->addAction("Paste Voxels", this, SLOT(pasteVoxels()), Qt::CTRL | Qt::Key_V);
15911595
15921596 QMenu* debugMenu = menuBar->addMenu("Debug");
15931597

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t