Drag and Drop, mod management.
This commit is contained in:
parent
253067c782
commit
c92ad7dcf8
16 changed files with 470 additions and 80 deletions
|
@ -64,11 +64,6 @@
|
|||
#include "instancedelegate.h"
|
||||
#include "IconPickerDialog.h"
|
||||
|
||||
// Opens the given file in the default application.
|
||||
// TODO: Move this somewhere.
|
||||
void openFileInDefaultProgram ( QString filename );
|
||||
void openDirInDefaultProgram ( QString dirpath, bool ensureExists = false );
|
||||
|
||||
MainWindow::MainWindow ( QWidget *parent ) :
|
||||
QMainWindow ( parent ),
|
||||
ui ( new Ui::MainWindow ),
|
||||
|
@ -376,7 +371,8 @@ void MainWindow::on_actionEditInstMods_triggered()
|
|||
if (inst)
|
||||
{
|
||||
auto dialog = inst->createModEditDialog(this);
|
||||
dialog->exec();
|
||||
if(dialog)
|
||||
dialog->exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -537,22 +533,6 @@ void MainWindow::openWebPage ( QUrl url )
|
|||
browser->exec();
|
||||
}
|
||||
|
||||
void openDirInDefaultProgram ( QString path, bool ensureExists )
|
||||
{
|
||||
QDir parentPath;
|
||||
QDir dir( path );
|
||||
if(!dir.exists())
|
||||
{
|
||||
parentPath.mkpath(dir.absolutePath());
|
||||
}
|
||||
QDesktopServices::openUrl ( "file:///" + dir.absolutePath() );
|
||||
}
|
||||
|
||||
void openFileInDefaultProgram ( QString filename )
|
||||
{
|
||||
QDesktopServices::openUrl ( "file:///" + QFileInfo ( filename ).absolutePath() );
|
||||
}
|
||||
|
||||
void MainWindow::on_actionChangeInstMCVersion_triggered()
|
||||
{
|
||||
if (view->selectionModel()->selectedIndexes().count() < 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue