mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: JSON view now shows array size
This commit is contained in:
parent
2be12110bf
commit
eafd322058
2 changed files with 7 additions and 11 deletions
|
|
@ -345,13 +345,8 @@ void DiagramEditor::MouseMove(Point p, dword keyflags)
|
|||
}
|
||||
else {
|
||||
bool rotated = m.rotate;
|
||||
if(rotated) {
|
||||
DLOG("======");
|
||||
DDUMP(p);
|
||||
if(rotated)
|
||||
p = m.Rotation(-1).Transform(Pointf(p) - drag_cp) + drag_cp;
|
||||
DDUMP(p);
|
||||
DDUMP(r);
|
||||
}
|
||||
Do(draghandle.x, r.left, r.right, p.x);
|
||||
Do(draghandle.y, r.top, r.bottom, p.y);
|
||||
if(m.aspect_ratio && 0) {
|
||||
|
|
|
|||
|
|
@ -36,18 +36,19 @@ int sAddNode(TreeCtrl& tree, int parent_id, const Value& id, const String& name,
|
|||
else
|
||||
if(v.Is<ValueMap>()) {
|
||||
ValueMap m = v;
|
||||
parent_id = tree.Add(parent_id, IdeCommonImg::JsonStruct(), id, "[G1 [* " + name);
|
||||
parent_id = tree.Add(parent_id, IdeCommonImg::JsonStruct(), id, "[G1 [* " + name + ':');
|
||||
for(int i = 0; i < m.GetCount(); i++)
|
||||
sAddNode(tree, parent_id, m.GetKey(i), "[@B \1" + String(m.GetKey(i)) + "\1:]", m.GetValue(i));
|
||||
sAddNode(tree, parent_id, m.GetKey(i), "[@B \1" + String(m.GetKey(i)) + "\1]", m.GetValue(i));
|
||||
}
|
||||
else
|
||||
if(v.Is<ValueArray>()) {
|
||||
parent_id = tree.Add(parent_id, IdeCommonImg::JsonArray(), id, "[G1 [* " + name);
|
||||
parent_id = tree.Add(parent_id, IdeCommonImg::JsonArray(), id,
|
||||
"[G1 [* " + name + "]\1[" + AsString(v.GetCount()) + "]:\1");
|
||||
for(int i = 0; i < v.GetCount(); i++)
|
||||
sAddNode(tree, parent_id, i, "[@c " + AsString(i) + ":]", v[i]);
|
||||
sAddNode(tree, parent_id, i, "[@c " + AsString(i) + "]", v[i]);
|
||||
}
|
||||
else {
|
||||
String qtf = "[G1 [* " + name + "]";
|
||||
String qtf = "[G1 [* " + name + ":]";
|
||||
Image img = IdeCommonImg::JsonNumber();
|
||||
if(IsString(v)) {
|
||||
img = IdeCommonImg::JsonString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue