main: allow running partial query by selection
This commit is contained in:
parent
3a4bdbde94
commit
db5f6816c5
7
main.go
7
main.go
@ -263,6 +263,11 @@ func (f *TMainForm) OnQueryExecute(sender vcl.IObject) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryString := f.queryInput.Text()
|
||||||
|
if f.queryInput.SelLength() > 0 {
|
||||||
|
queryString = f.queryInput.SelText() // Just the selected text
|
||||||
|
}
|
||||||
|
|
||||||
// Execute
|
// Execute
|
||||||
node := f.Buckets.Selected()
|
node := f.Buckets.Selected()
|
||||||
if node == nil {
|
if node == nil {
|
||||||
@ -271,7 +276,7 @@ func (f *TMainForm) OnQueryExecute(sender vcl.IObject) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ndata := (*navData)(node.Data())
|
ndata := (*navData)(node.Data())
|
||||||
ndata.ld.ExecQuery(f.queryInput.Text(), f.queryResult)
|
ndata.ld.ExecQuery(queryString, f.queryResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *TMainForm) OnNavChange(sender vcl.IObject, node *vcl.TTreeNode) {
|
func (f *TMainForm) OnNavChange(sender vcl.IObject, node *vcl.TTreeNode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user