[sword-svn] r2698 - in trunk: include src/keys
scribe at crosswire.org
scribe at crosswire.org
Tue Apr 24 22:22:26 MST 2012
Author: scribe
Date: 2012-04-24 22:22:25 -0700 (Tue, 24 Apr 2012)
New Revision: 2698
Modified:
trunk/include/listkey.h
trunk/src/keys/listkey.cpp
Log:
added missing getShortText for ListKey
Modified: trunk/include/listkey.h
===================================================================
--- trunk/include/listkey.h 2012-04-25 05:21:33 UTC (rev 2697)
+++ trunk/include/listkey.h 2012-04-25 05:22:25 UTC (rev 2698)
@@ -127,6 +127,7 @@
virtual long getIndex() const { return arraypos; }
virtual const char *getRangeText() const;
virtual const char *getOSISRefRangeText() const;
+ virtual const char *getShortText() const;
/**
* Returns the index for the new one given as as parameter.
Modified: trunk/src/keys/listkey.cpp
===================================================================
--- trunk/src/keys/listkey.cpp 2012-04-25 05:21:33 UTC (rev 2697)
+++ trunk/src/keys/listkey.cpp 2012-04-25 05:22:25 UTC (rev 2698)
@@ -327,7 +327,13 @@
return (key) ? key->getText() : keytext;
}
+const char *ListKey::getShortText() const {
+ int pos = arraypos;
+ SWKey *key = (pos >= arraycnt || !arraycnt) ? 0:array[pos];
+ return (key) ? key->getShortText() : keytext;
+}
+
void ListKey::setText(const char *ikey) {
// at least try to set the current element to this text
for (arraypos = 0; arraypos < arraycnt; arraypos++) {
More information about the sword-cvs
mailing list