fix update flags for imports

This commit is contained in:
T1ti
2023-01-19 02:38:59 +01:00
parent 77de6a9c10
commit 565222159b
2 changed files with 6 additions and 2 deletions

View File

@@ -1300,6 +1300,8 @@ void MapTile::setAlphaImage(QImage const& image, unsigned layer)
if (layer >= chunk->texture_set->num())
continue;
chunk->registerChunkUpdate(ChunkUpdateFlags::ALPHAMAP);
chunk->texture_set->create_temporary_alphamaps_if_needed();
auto& temp_alphamaps = chunk->texture_set->getTempAlphamaps()->value();
@@ -1366,6 +1368,8 @@ void MapTile::setVertexColorImage(QImage const& image, int mode)
{
MapChunk* chunk = getChunk(k, l);
chunk->registerChunkUpdate(ChunkUpdateFlags::MCCV);
glm::vec3* colors = chunk->getVertexColors();
for (unsigned y = 0; y < SUM; ++y)

View File

@@ -1813,7 +1813,7 @@ void MapView::setupAssistMenu()
(
makeCurrent();
OpenGL::context::scoped_setter const _(::gl, context());
NOGGIT_ACTION_MGR->beginAction(this, Noggit::ActionFlags::eCHUNKS_TEXTURE);
NOGGIT_ACTION_MGR->beginAction(this, Noggit::ActionFlags::eCHUNKS_TERRAIN);
_world->importAllADTsHeightmaps(adt_import_height_params_multiplier->value(), adt_import_height_params_mode->currentIndex());
NOGGIT_ACTION_MGR->endAction();
)
@@ -1832,7 +1832,7 @@ void MapView::setupAssistMenu()
(
makeCurrent();
OpenGL::context::scoped_setter const _(::gl, context());
NOGGIT_ACTION_MGR->beginAction(this, Noggit::ActionFlags::eCHUNKS_TEXTURE);
NOGGIT_ACTION_MGR->beginAction(this, Noggit::ActionFlags::eCHUNKS_VERTEX_COLOR);
_world->importAllADTVertexColorMaps(adt_import_vcol_params_mode->currentIndex());
NOGGIT_ACTION_MGR->endAction();
)