Is the view.currentRow always returns = -1, IF no Row is selected ??

For me, the code below works fine

Qt Code:
  1. if(view.currentRow == -1){
  2. console.log("No Row is selected !!")
  3. }
  4. else{
  5. console.log("Row is selected OK")
  6. }
To copy to clipboard, switch view to plain text mode