|
|
|
@ -235,7 +235,7 @@ void CSVRender::TerrainTextureMode::drag (const QPoint& pos, int diffX, int diff
|
|
|
|
|
|
|
|
|
|
void CSVRender::TerrainTextureMode::dragCompleted(const QPoint& pos)
|
|
|
|
|
{
|
|
|
|
|
if (mDragMode == InteractionType_PrimaryEdit)
|
|
|
|
|
if (mDragMode == InteractionType_PrimaryEdit && mIsEditing)
|
|
|
|
|
{
|
|
|
|
|
CSMDoc::Document& document = getWorldspaceWidget().getDocument();
|
|
|
|
|
QUndoStack& undoStack = document.getUndoStack();
|
|
|
|
@ -244,14 +244,11 @@ void CSVRender::TerrainTextureMode::dragCompleted(const QPoint& pos)
|
|
|
|
|
int index = landtexturesCollection.searchId(mBrushTexture);
|
|
|
|
|
|
|
|
|
|
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
|
|
|
|
{
|
|
|
|
|
if (mIsEditing)
|
|
|
|
|
{
|
|
|
|
|
undoStack.endMacro();
|
|
|
|
|
mIsEditing = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVRender::TerrainTextureMode::dragAborted()
|
|
|
|
|