From: daid303 Date: Thu, 7 Feb 2013 09:03:03 +0000 (+0100) Subject: Added some clipboard scanning code which does not do anything yet. X-Git-Tag: 13.03~54 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bccaaa2c45d70fbfcba7fd95b8c82571258b65f4;p=cura.git Added some clipboard scanning code which does not do anything yet. --- diff --git a/Cura/gui/preview3d.py b/Cura/gui/preview3d.py index 300f408f..348c273d 100644 --- a/Cura/gui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -365,6 +365,15 @@ class previewPanel(wx.Panel): if obj.filename is not None and os.path.isfile(obj.filename) and obj.fileTime != os.stat(obj.filename).st_mtime: self.checkReloadFileTimer.Stop() self.ShowWarningPopup('File changed, reload?', self.reloadModelFiles) + if wx.TheClipboard.Open(): + data = wx.TextDataObject() + if wx.TheClipboard.GetData(data): + data = data.GetText() + if re.match('^http://.*/.*$', data): + if data.endswith(tuple(meshLoader.supportedExtensions())): + #Got an url on the clipboard with a model file. + pass + wx.TheClipboard.Close() def reloadModelFiles(self, filelist = None): if filelist is not None: