paysages : Small fixes.

git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@379 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
Michaël Lemaire 2012-07-05 15:50:46 +00:00 committed by ThunderK
parent 50226f0000
commit a01c97cda3
4 changed files with 8 additions and 4 deletions

View file

@ -264,7 +264,9 @@ void BaseForm::layerUpClicked()
layerMovedEvent(_layer_list->currentIndex(), _layer_list->currentIndex() + 1); layerMovedEvent(_layer_list->currentIndex(), _layer_list->currentIndex() + 1);
rebuildLayerList(); rebuildLayerList();
_layer_list->setCurrentIndex(_layer_list->currentIndex() + 1);
_button_apply->setEnabled(true); _button_apply->setEnabled(true);
_button_revert->setEnabled(true); _button_revert->setEnabled(true);
} }
@ -278,6 +280,8 @@ void BaseForm::layerDownClicked()
rebuildLayerList(); rebuildLayerList();
_layer_list->setCurrentIndex(_layer_list->currentIndex() - 1);
_button_apply->setEnabled(true); _button_apply->setEnabled(true);
_button_revert->setEnabled(true); _button_revert->setEnabled(true);
} }

View file

@ -67,7 +67,7 @@ FormAtmosphere::FormAtmosphere(QWidget *parent):
addInputDouble(tr("End distance"), &_definition.distance_far, -500.0, 500.0, 5.0, 50.0); addInputDouble(tr("End distance"), &_definition.distance_far, -500.0, 500.0, 5.0, 50.0);
addInputDouble(tr("Masking power"), &_definition.full_mask, 0.0, 1.0, 0.01, 0.1); addInputDouble(tr("Masking power"), &_definition.full_mask, 0.0, 1.0, 0.01, 0.1);
addInputBoolean(tr("Lock on horizon color"), &_definition.auto_lock_on_haze); addInputBoolean(tr("Lock on horizon color"), &_definition.auto_lock_on_haze);
addInputColor(tr("Color"), &_definition.color); addInputColor(tr("Color"), &_definition.color)->setEnabledCondition(&_definition.auto_lock_on_haze, 0);
revertConfig(); revertConfig();
} }

View file

@ -283,7 +283,7 @@ void cloudsMoveLayer(CloudsDefinition* definition, int layer, int new_position)
} }
else else
{ {
memmove(definition->layers + new_position, definition->layers + new_position + 1, sizeof(CloudsLayerDefinition) * (layer - new_position)); memmove(definition->layers + new_position + 1, definition->layers + new_position, sizeof(CloudsLayerDefinition) * (layer - new_position));
} }
definition->layers[new_position] = temp; definition->layers[new_position] = temp;
} }

View file

@ -226,7 +226,7 @@ void texturesMoveLayer(TexturesDefinition* definition, int layer, int new_positi
} }
else else
{ {
memmove(definition->layers + new_position, definition->layers + new_position + 1, sizeof(TextureLayerDefinition) * (layer - new_position)); memmove(definition->layers + new_position + 1, definition->layers + new_position, sizeof(TextureLayerDefinition) * (layer - new_position));
} }
definition->layers[new_position] = temp; definition->layers[new_position] = temp;
} }