mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-01 01:34:57 +08:00
Tables, Error Handling: Recovery from invalid index in TableSetColumnIndex(). (#1651)
This commit is contained in:
@@ -66,6 +66,7 @@ Other changes:
|
|||||||
overridden when hot-reloading .ini state. (#7934)
|
overridden when hot-reloading .ini state. (#7934)
|
||||||
- Tables: tamed some .ini settings optimizations to more accurately allow
|
- Tables: tamed some .ini settings optimizations to more accurately allow
|
||||||
overwriting/hot-reloading settings in more situations. (#7934)
|
overwriting/hot-reloading settings in more situations. (#7934)
|
||||||
|
- Tables, Error Handling: Recovery from invalid index in TableSetColumnIndex(). (#1651)
|
||||||
- Styles, Tabs: made the Close Button of selected tabs always visible by default,
|
- Styles, Tabs: made the Close Button of selected tabs always visible by default,
|
||||||
without requiring to hover the tab. (#8387)
|
without requiring to hover the tab. (#8387)
|
||||||
- Added style.TabCloseButtonMinWidthSelected/TabCloseButtonMinWidthUnselected settings
|
- Added style.TabCloseButtonMinWidthSelected/TabCloseButtonMinWidthUnselected settings
|
||||||
|
|||||||
+5
-1
@@ -2106,7 +2106,11 @@ bool ImGui::TableSetColumnIndex(int column_n)
|
|||||||
{
|
{
|
||||||
if (table->CurrentColumn != -1)
|
if (table->CurrentColumn != -1)
|
||||||
TableEndCell(table);
|
TableEndCell(table);
|
||||||
IM_ASSERT(column_n >= 0 && table->ColumnsCount);
|
if ((column_n >= 0 && column_n < table->ColumnsCount) == false)
|
||||||
|
{
|
||||||
|
IM_ASSERT_USER_ERROR(column_n >= 0 && column_n < table->ColumnsCount, "TableSetColumnIndex() invalid column index!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
TableBeginCell(table, column_n);
|
TableBeginCell(table, column_n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user