# HG changeset patch # User John W. Eaton # Date 1383334819 14400 # Node ID 574ab045f70cfac9b83b49ed2d92d39a56012e55 # Parent 53f433bae63b1f90a0ed80d5924371a4cb662b97 restore display of "persistent", "automatic", etc. removed by 53f433bae63b * workspace-model.cc (workspace_model::data): Restore display of "persistent", "automatic", etc. storage classes. Allow "complex" to be translated. diff --git a/libgui/src/workspace-model.cc b/libgui/src/workspace-model.cc --- a/libgui/src/workspace-model.cc +++ b/libgui/src/workspace-model.cc @@ -166,9 +166,33 @@ break; case 4: - retval = QVariant (_complex_flags[idx.row ()] ? "complex" : ""); + { + QString sclass; + + QString class_chars = resource_manager::storage_class_chars (); + + int actual_class + = class_chars.indexOf (_scopes[idx.row ()].toAscii ()); + + if (actual_class >= 0) + { + QStringList class_names + = resource_manager::storage_class_names (); + + sclass = class_names.at (actual_class); + } + + if (_complex_flags[idx.row ()]) + { + if (sclass.isEmpty ()) + sclass = tr ("complex"); + else + sclass += ", " + tr ("complex"); + } + + retval = QVariant (sclass); + } break; - } } }