remove drag rendering entirely for now

This commit is contained in:
Grange Nagy
2023-12-02 21:53:31 -05:00
parent b889da7e68
commit cdfa52e9ed

View File

@@ -195,8 +195,9 @@ class FitItem(SFItem.SFBrowserItem):
self.dragged = False self.dragged = False
if self.HasCapture(): if self.HasCapture():
self.ReleaseMouse() self.ReleaseMouse()
self.dragWindow.Show(False) # TODO: re-enable this once rendring of drag window is fixed
self.dragWindow = None #self.dragWindow.Show(False)
#self.dragWindow = None
def OnContextMenu(self, event): def OnContextMenu(self, event):
""" Handles context menu for fit. Dragging is handled by MouseLeftUp() """ """ Handles context menu for fit. Dragging is handled by MouseLeftUp() """
@@ -418,9 +419,10 @@ class FitItem(SFItem.SFBrowserItem):
if self.dragMotionTrigger < 0: if self.dragMotionTrigger < 0:
if not self.HasCapture(): if not self.HasCapture():
self.CaptureMouse() self.CaptureMouse()
self.dragWindow = PFBitmapFrame(self, pos, self.dragTLFBmp) # self.dragWindow = PFBitmapFrame(self, pos, self.dragTLFBmp)
self.dragWindow.Show() # TODO: re-enable this once rendring of drag window is fixed
self.dragged = True #self.dragWindow.Show()
#self.dragged = True
self.dragMotionTrigger = self.dragMotionTrail self.dragMotionTrigger = self.dragMotionTrail
else: else:
self.dragMotionTrigger -= 1 self.dragMotionTrigger -= 1
@@ -519,11 +521,12 @@ class FitItem(SFItem.SFBrowserItem):
if self.tcFitName.IsShown(): if self.tcFitName.IsShown():
self.AdjustControlSizePos(self.tcFitName, self.textStartx, self.toolbarx - self.editWidth - self.padding) self.AdjustControlSizePos(self.tcFitName, self.textStartx, self.toolbarx - self.editWidth - self.padding)
tdc = wx.MemoryDC() # TODO: migrate this away from a bitmap
self.dragTLFBmp = wx.Bitmap((self.toolbarx if self.toolbarx < 200 else 200), rect.height, 24) #tdc = wx.MemoryDC()
tdc.SelectObject(self.dragTLFBmp) #self.dragTLFBmp = wx.Bitmap((self.toolbarx if self.toolbarx < 200 else 200), rect.height, 24)
tdc.Blit(0, 0, (self.toolbarx if self.toolbarx < 200 else 200), rect.height, mdc, 0, 0, wx.COPY) #tdc.SelectObject(self.dragTLFBmp)
tdc.SelectObject(wx.NullBitmap) #tdc.Blit(0, 0, (self.toolbarx if self.toolbarx < 200 else 200), rect.height, mdc, 0, 0, wx.COPY)
#tdc.SelectObject(wx.NullBitmap)
def AdjustControlSizePos(self, editCtl, start, end): def AdjustControlSizePos(self, editCtl, start, end):
fnEditSize = editCtl.GetSize() fnEditSize = editCtl.GetSize()