Commit 30ba029d authored by claes's avatar claes

Open annotation without selecting the text

parent a3acc154
...@@ -3155,6 +3155,11 @@ void GeValueInput::get_attributes( attr_sItem *attrinfo, int *item_count) ...@@ -3155,6 +3155,11 @@ void GeValueInput::get_attributes( attr_sItem *attrinfo, int *item_count)
attrinfo[i].type = glow_eType_Boolean; attrinfo[i].type = glow_eType_Boolean;
attrinfo[i++].size = sizeof( popup); attrinfo[i++].size = sizeof( popup);
strcpy( attrinfo[i].name, "ValueInput.Unselect");
attrinfo[i].value = &unselect;
attrinfo[i].type = glow_eType_Boolean;
attrinfo[i++].size = sizeof( unselect);
dyn->display_access = true; dyn->display_access = true;
*item_count = i; *item_count = i;
} }
...@@ -3166,6 +3171,7 @@ void GeValueInput::save( ofstream& fp) ...@@ -3166,6 +3171,7 @@ void GeValueInput::save( ofstream& fp)
fp << int(ge_eSave_ValueInput_max_value) << FSPACE << max_value << endl; fp << int(ge_eSave_ValueInput_max_value) << FSPACE << max_value << endl;
fp << int(ge_eSave_ValueInput_clear) << FSPACE << clear << endl; fp << int(ge_eSave_ValueInput_clear) << FSPACE << clear << endl;
fp << int(ge_eSave_ValueInput_popup) << FSPACE << popup << endl; fp << int(ge_eSave_ValueInput_popup) << FSPACE << popup << endl;
fp << int(ge_eSave_ValueInput_unselect) << FSPACE << unselect << endl;
fp << int(ge_eSave_End) << endl; fp << int(ge_eSave_End) << endl;
} }
...@@ -3184,6 +3190,7 @@ void GeValueInput::open( ifstream& fp) ...@@ -3184,6 +3190,7 @@ void GeValueInput::open( ifstream& fp)
case ge_eSave_ValueInput_max_value: fp >> max_value; break; case ge_eSave_ValueInput_max_value: fp >> max_value; break;
case ge_eSave_ValueInput_clear: fp >> clear; break; case ge_eSave_ValueInput_clear: fp >> clear; break;
case ge_eSave_ValueInput_popup: fp >> popup; break; case ge_eSave_ValueInput_popup: fp >> popup; break;
case ge_eSave_ValueInput_unselect: fp >> unselect; break;
case ge_eSave_End: end_found = 1; break; case ge_eSave_End: end_found = 1; break;
default: default:
cout << "GeValueInput:open syntax error" << endl; cout << "GeValueInput:open syntax error" << endl;
...@@ -3248,6 +3255,8 @@ int GeValueInput::action( grow_tObject object, glow_tEvent event) ...@@ -3248,6 +3255,8 @@ int GeValueInput::action( grow_tObject object, glow_tEvent event)
if ( clear) if ( clear)
grow_SetAnnotationBrief( object, 1, "", 0); grow_SetAnnotationBrief( object, 1, "", 0);
grow_OpenAnnotationInput( object, 1); grow_OpenAnnotationInput( object, 1);
if ( unselect)
grow_SetAnnotationSelection( object, 0);
} }
} }
else { else {
......
...@@ -303,6 +303,7 @@ extern "C" { ...@@ -303,6 +303,7 @@ extern "C" {
ge_eSave_ValueInput_max_value = 1303, ge_eSave_ValueInput_max_value = 1303,
ge_eSave_ValueInput_clear = 1304, ge_eSave_ValueInput_clear = 1304,
ge_eSave_ValueInput_popup = 1305, ge_eSave_ValueInput_popup = 1305,
ge_eSave_ValueInput_unselect = 1306,
ge_eSave_Rotate_attribute = 1400, ge_eSave_Rotate_attribute = 1400,
ge_eSave_Rotate_x0 = 1401, ge_eSave_Rotate_x0 = 1401,
ge_eSave_Rotate_y0 = 1402, ge_eSave_Rotate_y0 = 1402,
...@@ -1087,6 +1088,7 @@ class GeValueInput : public GeDynElem { ...@@ -1087,6 +1088,7 @@ class GeValueInput : public GeDynElem {
double max_value; //!< Maximum value for input. double max_value; //!< Maximum value for input.
int clear; //!< Clear input field it is when opened. int clear; //!< Clear input field it is when opened.
int popup; //!< Input in popup dialog. int popup; //!< Input in popup dialog.
int unselect; //!< Text not selected in input field when opened.
int annot_typeid; int annot_typeid;
int annot_size; int annot_size;
......
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