forked from townforge/townforge
game: fix duplicate error message in palette screen
This commit is contained in:
parent
cac6dc3c41
commit
0f87bd89f8
@ -259,12 +259,9 @@ void UIPaletteDialog::PaletteWidget::HandleBlockSelected(const tb::TBWidgetEvent
|
||||
blockWidget->SetText("");
|
||||
PaletteItem *palette_item = m_source->GetItem(m_index);
|
||||
palette_item->block = block;
|
||||
variantWidget->SetValue(-1);
|
||||
if (block != ITEM_NONE)
|
||||
{
|
||||
variantWidget->SetSource(&palette_item->variant_sources[block]);
|
||||
if (variantWidget->GetSource()->GetNumItems() > 0)
|
||||
variantWidget->SetValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -309,12 +306,9 @@ void UIPaletteDialog::PaletteWidget::SelectBlock(int idx)
|
||||
}
|
||||
PaletteItem *palette_item = m_source->GetItem(m_index);
|
||||
palette_item->block = block;
|
||||
variantWidget->SetValue(-1);
|
||||
if (block != ITEM_NONE)
|
||||
{
|
||||
variantWidget->SetSource(&palette_item->variant_sources[block]);
|
||||
if (variantWidget->GetSource()->GetNumItems() > 0)
|
||||
variantWidget->SetValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user