mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 21:09:42 +00:00
block saving while OpenMW process is running
This commit is contained in:
parent
c88b3a1520
commit
bee36c9167
1 changed files with 4 additions and 3 deletions
|
@ -281,6 +281,7 @@ void CSVDoc::View::updateTitle()
|
||||||
void CSVDoc::View::updateActions()
|
void CSVDoc::View::updateActions()
|
||||||
{
|
{
|
||||||
bool editing = !(mDocument->getState() & CSMDoc::State_Locked);
|
bool editing = !(mDocument->getState() & CSMDoc::State_Locked);
|
||||||
|
bool running = mDocument->getState() & CSMDoc::State_Running;
|
||||||
|
|
||||||
for (std::vector<QAction *>::iterator iter (mEditingActions.begin()); iter!=mEditingActions.end(); ++iter)
|
for (std::vector<QAction *>::iterator iter (mEditingActions.begin()); iter!=mEditingActions.end(); ++iter)
|
||||||
(*iter)->setEnabled (editing);
|
(*iter)->setEnabled (editing);
|
||||||
|
@ -288,11 +289,11 @@ void CSVDoc::View::updateActions()
|
||||||
mUndo->setEnabled (editing & mDocument->getUndoStack().canUndo());
|
mUndo->setEnabled (editing & mDocument->getUndoStack().canUndo());
|
||||||
mRedo->setEnabled (editing & mDocument->getUndoStack().canRedo());
|
mRedo->setEnabled (editing & mDocument->getUndoStack().canRedo());
|
||||||
|
|
||||||
mSave->setEnabled (!(mDocument->getState() & CSMDoc::State_Saving));
|
mSave->setEnabled (!(mDocument->getState() & CSMDoc::State_Saving) && !running);
|
||||||
mVerify->setEnabled (!(mDocument->getState() & CSMDoc::State_Verifying));
|
mVerify->setEnabled (!(mDocument->getState() & CSMDoc::State_Verifying));
|
||||||
|
|
||||||
mRunDebug->setEnabled (!(mDocument->getState() & CSMDoc::State_Running));
|
mRunDebug->setEnabled (!running);
|
||||||
mStopDebug->setEnabled ((mDocument->getState() & CSMDoc::State_Running));
|
mStopDebug->setEnabled (running);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews)
|
CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews)
|
||||||
|
|
Loading…
Reference in a new issue