int type = getDefaultType(geo);
// default
GeoElement defaultGeo = getDefaultGeo(type);
Application app = cons.getApplication();
if (defaultGeo != null) {
geo.setAllVisualProperties(defaultGeo, isReset);
if(!isReset) {
// set to highest used layer
if (app != null) {
EuclidianView ev = app.getEuclidianView();
if (ev != null)
geo.setLayer(ev.getMaxLayerUsed());
}
}
}
// label visibility
int labelingStyle = app == null ? LABEL_VISIBLE_USE_DEFAULTS :
app.getLabelingStyle();
// automatic labelling:
// if algebra window open -> all labels
// else -> no labels
if (labelingStyle == LABEL_VISIBLE_AUTOMATIC) {
if(app.hasGuiManager()) {
labelingStyle = LABEL_VISIBLE_USE_DEFAULTS;
/* TODO method chains doesn't allow app.getGuiManager().showAlgebraView() to appear here, fix this (F.S.)
labelingStyle = app.getGuiManager().showAlgebraView() ?
LABEL_VISIBLE_USE_DEFAULTS :
LABEL_VISIBLE_ALWAYS_OFF;*/