mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:49:58 +00:00
move check to outermost scope
This commit is contained in:
parent
0880923189
commit
4ccb951126
1 changed files with 3 additions and 6 deletions
|
@ -235,7 +235,7 @@ void CSVRender::TerrainTextureMode::drag (const QPoint& pos, int diffX, int diff
|
||||||
|
|
||||||
void CSVRender::TerrainTextureMode::dragCompleted(const QPoint& pos)
|
void CSVRender::TerrainTextureMode::dragCompleted(const QPoint& pos)
|
||||||
{
|
{
|
||||||
if (mDragMode == InteractionType_PrimaryEdit)
|
if (mDragMode == InteractionType_PrimaryEdit && mIsEditing)
|
||||||
{
|
{
|
||||||
CSMDoc::Document& document = getWorldspaceWidget().getDocument();
|
CSMDoc::Document& document = getWorldspaceWidget().getDocument();
|
||||||
QUndoStack& undoStack = document.getUndoStack();
|
QUndoStack& undoStack = document.getUndoStack();
|
||||||
|
@ -245,11 +245,8 @@ void CSVRender::TerrainTextureMode::dragCompleted(const QPoint& pos)
|
||||||
|
|
||||||
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
||||||
{
|
{
|
||||||
if (mIsEditing)
|
undoStack.endMacro();
|
||||||
{
|
mIsEditing = false;
|
||||||
undoStack.endMacro();
|
|
||||||
mIsEditing = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue