mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2535 Use the MainWindowTools class instead of MainWindow directly (part 4)
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include "RicScriptFeatureImpl.h"
|
||||
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@@ -49,7 +49,7 @@ bool RicAddScriptPathFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicAddScriptPathFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
QString selectedFolder = QFileDialog::getExistingDirectory(RiuMainWindow::instance(), "Select script folder");
|
||||
QString selectedFolder = QFileDialog::getExistingDirectory(Riu3DMainWindowTools::mainWindowWidget(), "Select script folder");
|
||||
if (!selectedFolder.isEmpty())
|
||||
{
|
||||
QString filePathString = RiaApplication::instance()->preferences()->scriptDirectories();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "RimCalcScript.h"
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cvfAssert.h"
|
||||
@@ -65,7 +65,7 @@ void RicEditScriptFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (!myProcess->waitForStarted(1000))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "RimCalcScript.h"
|
||||
#include "RimScriptCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include "cafUtils.h"
|
||||
@@ -99,7 +99,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
QFile file(fullPathFilenameNewScript);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to create file\n" + fullPathFilenameNewScript);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to create file\n" + fullPathFilenameNewScript);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (calcScript)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(calcScript);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(calcScript);
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
@@ -123,7 +123,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (!myProcess->waitForStarted(1000))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user