fix issue that if functional block is dragged from project panel into
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 25 Apr 2016 17:23:04 +0300
changeset 1504 d3f97b72c02a
parent 1503 3a238c0c5993
child 1505 5ecb16be9a3c
fix issue that if functional block is dragged from project panel into
ST text editor and in dialog 'Please enter a block name' button
'cancel' is pressed, despite of cancel text about drag'n'dropped type
is pasted in ST program.
editors/TextViewer.py
--- a/editors/TextViewer.py	Fri Apr 22 21:26:31 2016 +0300
+++ b/editors/TextViewer.py	Mon Apr 25 17:23:04 2016 +0300
@@ -262,6 +262,7 @@
                         if dialog.ShowModal() == wx.ID_OK:
                             blockname = dialog.GetValue()
                         else:
+                            event.SetDragText("")                            
                             return
                         dialog.Destroy()
                     if blockname.upper() in [name.upper() for name in self.Controler.GetProjectPouNames(self.Debug)]: