empty_query.txt

Leyan Ouyang, 2012-05-25 10:09 PM

Download (775 Bytes)

 
1
commit 5851b5a0fdec075985b51e8329c63a4ecf884240
2
Author: Koxinga <[email protected]>
3
Date:   Sat May 26 13:02:42 2012 +0800
4

    
5
    Treat empty query in query builder
6

    
7
diff --git a/src/gui/qgsquerybuilder.cpp b/src/gui/qgsquerybuilder.cpp
8
index 8094c4b..645a9c1 100644
9
--- a/src/gui/qgsquerybuilder.cpp
10
+++ b/src/gui/qgsquerybuilder.cpp
11
@@ -181,9 +181,6 @@ void QgsQueryBuilder::test()
12
 
13
 void QgsQueryBuilder::accept()
14
 {
15
-  // if user hits Ok and there is no query, skip the validation
16
-  if ( !txtSQL->toPlainText().trimmed().isEmpty() )
17
-  {
18
     if ( !mLayer->setSubsetString( txtSQL->toPlainText() ) )
19
     {
20
       //error in query - show the problem
21
@@ -201,7 +198,6 @@ void QgsQueryBuilder::accept()
22
       }
23
       return;
24
     }
25
-  }
26
 
27
   QDialog::accept();
28
 }