Skip to content

Commit

Permalink
显示性Bug修复:创建新表时不能直接显示字段
Browse files Browse the repository at this point in the history
  • Loading branch information
a13782425 committed Oct 22, 2018
1 parent b81effd commit b6e83cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Assets/TSDatabase/Editor/EditorWindows/CreateTableEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ private void TypeListAddCallback(ReorderableList list)
{
_tempTableConfig = new TableConfig();
_tempTableConfig.HasPrimaryKey = true;
_typeInfoList = new ReorderableList(_tempTableConfig.FieldList, typeof(FieldConfig), true, true, true, false);
_typeInfoList.elementHeight = 80;
_typeInfoList.drawHeaderCallback = TypeInfoListDrawHeaderCallback;
_typeInfoList.drawElementCallback = TypeInfoListDrawElementCallback;
_typeInfoList.onAddCallback = TypeInfoListAddCallback;
TSDatabaseUtils.TableConfigSerializeData.TableConfigList.Add(_tempTableConfig);
}

Expand All @@ -246,9 +251,10 @@ private void TypeListDrawHeaderCallback(Rect rect)
rect.width = 30;
if (GUI.Button(rect, "", "OL Plus"))
{
_tempTableConfig = new TableConfig();
_tempTableConfig.HasPrimaryKey = true;
TSDatabaseUtils.TableConfigSerializeData.TableConfigList.Add(_tempTableConfig);
TypeListAddCallback(null);
//_tempTableConfig = new TableConfig();
//_tempTableConfig.HasPrimaryKey = true;
//TSDatabaseUtils.TableConfigSerializeData.TableConfigList.Add(_tempTableConfig);
}
}
private void TypeListDrawElementCallback(Rect rect, int index, bool isActive, bool isFocused)
Expand Down
Binary file added TableDatabase3.2.1.zip
Binary file not shown.
Binary file modified TableDatabase3.2.zip
Binary file not shown.

0 comments on commit b6e83cf

Please sign in to comment.