mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1401 Disable model change notification for several features
This commit is contained in:
@@ -37,6 +37,8 @@ bool RicCloseProjectFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCloseProjectFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
if (!app->askUserToSaveModifiedProject()) return;
|
||||
|
||||
@@ -42,6 +42,8 @@ bool RicEditPreferencesFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicEditPreferencesFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QStringList tabNames = app->preferences()->tabNames();
|
||||
|
||||
@@ -37,7 +37,11 @@ bool RicExitApplicationFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExitApplicationFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if (!app->askUserToSaveModifiedProject()) return;
|
||||
|
||||
app->closeAllWindows();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ bool RicHelpAboutFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicHelpAboutFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
caf::AboutDialog dlg(NULL);
|
||||
|
||||
dlg.setApplicationName(RI_APPLICATION_NAME);
|
||||
|
||||
@@ -39,6 +39,8 @@ bool RicLaunchUnitTestsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicLaunchUnitTestsFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication::instance()->launchUnitTestsWithConsole();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ bool RicSaveProjectAsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSaveProjectAsFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
RicSaveProjectFeature::storeTreeViewState();
|
||||
|
||||
@@ -46,6 +46,8 @@ bool RicSaveProjectFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSaveProjectFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
RicSaveProjectFeature::storeTreeViewState();
|
||||
|
||||
@@ -39,6 +39,8 @@ bool RicShowMainWindowFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowMainWindowFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
||||
|
||||
if (mainWnd->isMinimized())
|
||||
|
||||
@@ -188,6 +188,8 @@ bool RicShowPlotDataFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowPlotDataFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
std::vector<RimSummaryPlot*> selectedSummaryPlots;
|
||||
caf::SelectionManager::instance()->objectsByType(&selectedSummaryPlots);
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ bool RicShowPlotWindowFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowPlotWindowFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ bool RicTileWindowsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicTileWindowsFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
RiuMainWindow* mainWindow = RiuMainWindow::instance();
|
||||
if (mainWindow)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user