re-enable debug if statement

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-21 18:42:14 -07:00
parent 0f1c19d351
commit 4876f4ae77
1 changed files with 7 additions and 7 deletions

View File

@ -13,22 +13,22 @@ import "image/color"
import "github.com/andlabs/ui" import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest" import _ "github.com/andlabs/ui/winmanifest"
// import "github.com/gookit/config" import "github.com/gookit/config"
var CurrentVM string var CurrentVM string
func (mh *TableData) NumRows(m *ui.TableModel) int { func (mh *TableData) NumRows(m *ui.TableModel) int {
// if (config.String("debugging") == "true") { if (config.String("debugging") == "true") {
log.Println("NumRows = mh.RowCount = ", mh.RowCount) log.Println("NumRows = mh.RowCount = ", mh.RowCount)
// } }
return mh.RowCount return mh.RowCount
} }
// FYI: this routine seems to be called around 10 to 100 times a second for each table // FYI: this routine seems to be called around 10 to 100 times a second for each table
func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue { func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue {
// if (config.String("debugging") == "true") { if (config.String("debugging") == "true") {
log.Println("ColumnTypes = ", mh.generatedColumnTypes) log.Println("ColumnTypes = ", mh.generatedColumnTypes)
// } }
return mh.generatedColumnTypes return mh.generatedColumnTypes
} }
@ -39,9 +39,9 @@ func libuiColorToGOlangColor(rgba color.RGBA) ui.TableColor {
// TODO: Figure out why this is being called 1000 times a second (10 times for each row & column) // TODO: Figure out why this is being called 1000 times a second (10 times for each row & column)
// Nevermind this TODO. Who gives a shit. This is a really smart way to treat the OS toolkits // Nevermind this TODO. Who gives a shit. This is a really smart way to treat the OS toolkits
func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue { func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue {
// if (config.String("debugging") == "true") { if (config.String("debugging") == "true") {
log.Println("CellValue() row, column =", row, column) log.Println("CellValue() row, column =", row, column)
// } }
humanID := mh.Cells[column].HumanID humanID := mh.Cells[column].HumanID
if (column == mh.Human[humanID].TextID) { if (column == mh.Human[humanID].TextID) {
return ui.TableString(mh.Rows[row].HumanData[humanID].Text) return ui.TableString(mh.Rows[row].HumanData[humanID].Text)