diff --git a/uppsrc/Core/Util.cpp b/uppsrc/Core/Util.cpp index eba62c02c..d9943eca1 100644 --- a/uppsrc/Core/Util.cpp +++ b/uppsrc/Core/Util.cpp @@ -425,7 +425,21 @@ String TextSettings::Get(const char *group, const char *key) const { int itemi = settings.Find(group); return itemi < 0 ? Null : settings.Get(group).Get(key, Null); +} +String TextSettings::Get(int groupIndex, const char *key) const +{ + return groupIndex >= 0 && groupIndex < settings.GetCount() ? + settings[groupIndex].Get(key, Null) : Null; +} + +String TextSettings::Get(int groupIndex, int keyIndex) const +{ + if (groupIndex >= 0 && groupIndex < settings.GetCount()) + return keyIndex >= 0 && keyIndex < settings[groupIndex].GetCount() ? + settings[groupIndex][keyIndex] : Null; + else + return Null; } // -------------------------------------------------------------- diff --git a/uppsrc/Core/Util.h b/uppsrc/Core/Util.h index 3dea1439f..ae78ed91b 100644 --- a/uppsrc/Core/Util.h +++ b/uppsrc/Core/Util.h @@ -300,12 +300,20 @@ class TextSettings { public: String Get(const char *group, const char *key) const; String Get(const char *key) const { return Get("", key); } - + String Get(int groupIndex, const char *key) const; + String Get(int groupIndex, int keyIndex) const; + String operator()(const char *group, const char *key) const { return Get(group, key); } String operator()(const char *key) const { return Get(key); } void Clear() { settings.Clear(); } void Load(const char *filename); + + int GetGroupCount() { return settings.GetCount(); } + int GetKeyCount(int group) { return settings[group].GetCount(); } + + String GetGroupName(int groupIndex) { return settings.GetKey(groupIndex); } + String GetKey(int groupIndex, int keyIndex) { return settings[groupIndex].GetKey(keyIndex); } }; // ------------------- Advanced streaming -------------------- diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index cd2758858..a083aa733 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -1114,6 +1114,14 @@ bool ArrayCtrl::AcceptRow() { Column& m = column[i]; if(m.edit && !m.edit->Accept()) return false; + if(IsCtrl(cursor, i)) { + Ctrl *c = GetCtrl(cursor, i).ctrl; + acceptingrow++; + bool b = c->Accept(); + acceptingrow--; + if(!b) + return false; + } } for(i = 0; i < control.GetCount(); i++) if(!control[i].ctrl->Accept()) diff --git a/uppsrc/GLCtrl/GLCtrl.h b/uppsrc/GLCtrl/GLCtrl.h index 71ab12a4e..fa416d66a 100644 --- a/uppsrc/GLCtrl/GLCtrl.h +++ b/uppsrc/GLCtrl/GLCtrl.h @@ -132,6 +132,9 @@ public: void StdView(); void InitPickMatrix() { picking.InitPickMatrix(); } + + void Refresh() { pane.Refresh(); } + Vector Pick(int x, int y); };