Commit 496f4bac authored by Claes Sjofors's avatar Claes Sjofors

Ge table select, element unselected when clicked on if already selected

parent eda4ed5a
...@@ -8250,6 +8250,7 @@ int GeTable::action( grow_tObject object, glow_tEvent event) ...@@ -8250,6 +8250,7 @@ int GeTable::action( grow_tObject object, glow_tEvent event)
sts = grow_GetSelectedCell( object, &column, &row); sts = grow_GetSelectedCell( object, &column, &row);
if ( ODD(sts) && sel_p[column]) { if ( ODD(sts) && sel_p[column]) {
// Reset previously selected
db = dyn->parse_attr_name( sel_attribute[column], parsed_name, &inverted, &attr_type, db = dyn->parse_attr_name( sel_attribute[column], parsed_name, &inverted, &attr_type,
&attr_size); &attr_size);
value = 0; value = 0;
...@@ -8257,7 +8258,9 @@ int GeTable::action( grow_tObject object, glow_tEvent event) ...@@ -8257,7 +8258,9 @@ int GeTable::action( grow_tObject object, glow_tEvent event)
sts = gdh_SetObjectInfo( parsed_name, &value, sizeof(value)); sts = gdh_SetObjectInfo( parsed_name, &value, sizeof(value));
if ( EVEN(sts)) printf("Table error: %s\n", parsed_name); if ( EVEN(sts)) printf("Table error: %s\n", parsed_name);
} }
if ( sel_p[event->table.column]) { if ( sel_p[event->table.column] &&
!(event->table.column == column && event->table.row == row)) {
// Set new selected, if not same as previous selected
db = dyn->parse_attr_name( sel_attribute[event->table.column], parsed_name, &inverted, &attr_type, db = dyn->parse_attr_name( sel_attribute[event->table.column], parsed_name, &inverted, &attr_type,
&attr_size); &attr_size);
value = 1; value = 1;
......
...@@ -544,7 +544,7 @@ void GrowTable::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, voi ...@@ -544,7 +544,7 @@ void GrowTable::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, voi
break; break;
} }
} }
ctx->gdraw->text( w, text_x, int(y - 2), ctx->gdraw->text( w, text_x, int(y - 5),
cell_value + offs, strlen(cell_value + offs), text_drawtype, text_color_drawtype, cell_value + offs, strlen(cell_value + offs), text_drawtype, text_color_drawtype,
text_idx, highlight, 0, font, tsize, 0); text_idx, highlight, 0, font, tsize, 0);
} }
...@@ -671,7 +671,7 @@ void GrowTable::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, voi ...@@ -671,7 +671,7 @@ void GrowTable::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, voi
} }
} }
ctx->gdraw->text( w, text_x, int(y - 2), ctx->gdraw->text( w, text_x, int(y - 5),
cell_value + offs, strlen(cell_value + offs), text_drawtype, text_color_drawtype, cell_value + offs, strlen(cell_value + offs), text_drawtype, text_color_drawtype,
text_idx, highlight, 0, font, tsize, 0); text_idx, highlight, 0, font, tsize, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment