Codechange: use better location for the "invalid" action sentinel value
It used to be a random sentinel for end-of-(widget-)list that was used to tell that no action has taken place yet. Since the last action is practically the widget that was pressed, add the sentinel to that enumeration.
This commit is contained in:
@@ -161,7 +161,7 @@ struct TerraformToolbarWindow : Window {
|
||||
/* This is needed as we like to have the tree available on OnInit. */
|
||||
this->CreateNestedTree();
|
||||
this->FinishInitNested(window_number);
|
||||
this->last_user_action = WIDGET_LIST_END;
|
||||
this->last_user_action = INVALID_WID_TT;
|
||||
}
|
||||
|
||||
~TerraformToolbarWindow()
|
||||
@@ -542,7 +542,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
||||
NWidgetStacked *show_desert = this->GetWidget<NWidgetStacked>(WID_ETT_SHOW_PLACE_DESERT);
|
||||
show_desert->SetDisplayedPlane(_settings_game.game_creation.landscape == LT_TROPIC ? 0 : SZSP_NONE);
|
||||
this->FinishInitNested(window_number);
|
||||
this->last_user_action = WIDGET_LIST_END;
|
||||
this->last_user_action = INVALID_WID_ETT;
|
||||
}
|
||||
|
||||
void OnPaint() override
|
||||
|
Reference in New Issue
Block a user