Skip to content
Snippets Groups Projects
Commit 161f0f19 authored by marco's avatar marco
Browse files

make query dialog/editor more robust when entering wrong queries

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2665 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent c35d6ee5
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ from ost import LogError, mol
from ost.bindings import tmtools
from ost.bindings import msms
from ost.seq import alg
import ost
from ost.gui.scene.query_editor import QueryEditorWidget,QueryDialog
class SelectRefDialog(QtGui.QDialog):
......@@ -329,7 +330,11 @@ class SelectMenuPoints(QtCore.QObject):
ent=scene_selection.GetActiveNode(0)
dialog=QueryDialog('Select...')
if dialog.exec_():
q=mol.Query(dialog.query)
if q.IsValid():
ent.selection=ent.view.Select(dialog.query, dialog.query_flags)
else:
ost.LogError("invalid query: %s" % q.error)
def _UniqueName(self, ent):
"""
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment