mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed unused code
This commit is contained in:
parent
2d5295cf74
commit
1654ab3c91
@ -834,26 +834,23 @@ void RiuMainWindow::slotAbout()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuMainWindow::slotImportGeoMechModel()
|
void RiuMainWindow::slotImportGeoMechModel()
|
||||||
{
|
{
|
||||||
if (checkForDocumentModifications())
|
RiaApplication* app = RiaApplication::instance();
|
||||||
|
|
||||||
|
QString defaultDir = app->lastUsedDialogDirectory("GEOMECH_MODEL");
|
||||||
|
QStringList fileNames = QFileDialog::getOpenFileNames(this, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)");
|
||||||
|
if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath();
|
||||||
|
app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir);
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < fileNames.size(); i++)
|
||||||
{
|
{
|
||||||
RiaApplication* app = RiaApplication::instance();
|
QString fileName = fileNames[i];
|
||||||
|
|
||||||
QString defaultDir = app->lastUsedDialogDirectory("GEOMECH_MODEL");
|
if (!fileNames.isEmpty())
|
||||||
QStringList fileNames = QFileDialog::getOpenFileNames(this, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)");
|
|
||||||
if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath();
|
|
||||||
app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir);
|
|
||||||
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < fileNames.size(); i++)
|
|
||||||
{
|
{
|
||||||
QString fileName = fileNames[i];
|
if (app->openOdbCaseFromFile(fileName))
|
||||||
|
|
||||||
if (!fileNames.isEmpty())
|
|
||||||
{
|
{
|
||||||
if (app->openOdbCaseFromFile(fileName))
|
addRecentFiles(fileName);
|
||||||
{
|
|
||||||
addRecentFiles(fileName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -865,23 +862,19 @@ void RiuMainWindow::slotImportGeoMechModel()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuMainWindow::slotOpenProject()
|
void RiuMainWindow::slotOpenProject()
|
||||||
{
|
{
|
||||||
if (checkForDocumentModifications())
|
RiaApplication* app = RiaApplication::instance();
|
||||||
|
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
||||||
|
QString fileName = QFileDialog::getOpenFileName(this, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)");
|
||||||
|
|
||||||
|
if (fileName.isEmpty()) return;
|
||||||
|
|
||||||
|
// Remember the path to next time
|
||||||
|
app->setLastUsedDialogDirectory("BINARY_GRID", QFileInfo(fileName).absolutePath());
|
||||||
|
|
||||||
|
if (app->loadProject(fileName))
|
||||||
{
|
{
|
||||||
RiaApplication* app = RiaApplication::instance();
|
addRecentFiles(fileName);
|
||||||
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
|
||||||
QString fileName = QFileDialog::getOpenFileName(this, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)");
|
|
||||||
|
|
||||||
if (fileName.isEmpty()) return;
|
|
||||||
|
|
||||||
// Remember the path to next time
|
|
||||||
app->setLastUsedDialogDirectory("BINARY_GRID", QFileInfo(fileName).absolutePath());
|
|
||||||
|
|
||||||
if (app->loadProject(fileName))
|
|
||||||
{
|
|
||||||
addRecentFiles(fileName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -945,36 +938,6 @@ void RiuMainWindow::slotInputMockModel()
|
|||||||
app->createInputMockModel();
|
app->createInputMockModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
bool RiuMainWindow::checkForDocumentModifications()
|
|
||||||
{
|
|
||||||
// RiaApplication* app = RiaApplication::instance();
|
|
||||||
// RISceneManager* project = app->sceneManager();
|
|
||||||
// if (project && project->isModified())
|
|
||||||
// {
|
|
||||||
// QMessageBox msgBox(this);
|
|
||||||
// msgBox.setIcon(QMessageBox::Warning);
|
|
||||||
// msgBox.setText("The project has been modified.");
|
|
||||||
// msgBox.setInformativeText("Do you want to save your changes?");
|
|
||||||
// msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
|
||||||
//
|
|
||||||
// int ret = msgBox.exec();
|
|
||||||
// if (ret == QMessageBox::Save)
|
|
||||||
// {
|
|
||||||
// project->saveAll();
|
|
||||||
// }
|
|
||||||
// else if (ret == QMessageBox::Cancel)
|
|
||||||
// {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -132,8 +132,6 @@ private:
|
|||||||
void createToolBars();
|
void createToolBars();
|
||||||
void createDockPanels();
|
void createDockPanels();
|
||||||
|
|
||||||
bool checkForDocumentModifications();
|
|
||||||
|
|
||||||
void updateRecentFileActions();
|
void updateRecentFileActions();
|
||||||
|
|
||||||
void storeTreeViewState();
|
void storeTreeViewState();
|
||||||
|
Loading…
Reference in New Issue
Block a user