Merge branch 'master' into develop
This commit is contained in:
commit
0fdb7c8174
2 changed files with 17 additions and 9 deletions
|
|
@ -79,6 +79,7 @@ EvMenu = None
|
|||
EvTable = None
|
||||
EvForm = None
|
||||
EvEditor = None
|
||||
EvMore = None
|
||||
|
||||
# Handlers
|
||||
SESSION_HANDLER = None
|
||||
|
|
@ -124,10 +125,11 @@ def _init():
|
|||
global DefaultRoom, DefaultExit, DefaultChannel, DefaultScript
|
||||
global ObjectDB, AccountDB, ScriptDB, ChannelDB, Msg
|
||||
global Command, CmdSet, default_cmds, syscmdkeys, InterruptCommand
|
||||
global search_object, search_script, search_account, search_channel, search_help, search_tag
|
||||
global search_object, search_script, search_account, search_channel, search_help, search_tag, search_message
|
||||
global create_object, create_script, create_account, create_channel, create_message, create_help_entry
|
||||
global settings, lockfuncs, logger, utils, gametime, ansi, spawn, managers
|
||||
global contrib, TICKER_HANDLER, MONITOR_HANDLER, SESSION_HANDLER, CHANNEL_HANDLER, TASK_HANDLER
|
||||
global EvMenu, EvTable, EvForm, EvMore, EvEditor
|
||||
|
||||
from .accounts.accounts import DefaultAccount
|
||||
from .accounts.accounts import DefaultGuest
|
||||
|
|
|
|||
|
|
@ -1421,8 +1421,21 @@ class EvTable(object):
|
|||
column = EvColumn(*args, **options)
|
||||
wtable = self.ncols
|
||||
htable = self.nrows
|
||||
excess = len(column) - htable
|
||||
|
||||
header = kwargs.get("header", None)
|
||||
if header:
|
||||
column.add_rows(unicode(header), ypos=0, **options)
|
||||
self.header = True
|
||||
elif self.header:
|
||||
# we have a header already. Offset
|
||||
column.add_rows("", ypos=0, **options)
|
||||
|
||||
# Calculate whether the new column needs to expand to the
|
||||
# current table size, or if the table needs to expand to
|
||||
# the column size.
|
||||
# This needs to happen after the header rows have already been
|
||||
# added to the column in order for the size calculations to match.
|
||||
excess = len(column) - htable
|
||||
if excess > 0:
|
||||
# we need to add new rows to table
|
||||
for col in self.table:
|
||||
|
|
@ -1435,13 +1448,6 @@ class EvTable(object):
|
|||
column.add_rows(*empty_rows, **options)
|
||||
self.nrows -= excess
|
||||
|
||||
header = kwargs.get("header", None)
|
||||
if header:
|
||||
column.add_rows(unicode(header), ypos=0, **options)
|
||||
self.header = True
|
||||
elif self.header:
|
||||
# we have a header already. Offset
|
||||
column.add_rows("", ypos=0, **options)
|
||||
if xpos is None or xpos > wtable - 1:
|
||||
# add to the end
|
||||
self.table.append(column)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue