dabo Commit
Revision 5892
Date: 2010-06-16 12:50:24 -0700 (Wed, 16 Jun 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5892
Changed:
U trunk/ide/ReportDesigner.py
Log:
Added Move Up / Move Down to groups and variables in the report designer.
Previously,
there was only Move to Top and Move to Bottom.
When moving groups, the entire designer surface needs to be redrawn, which
wasn't
happening before. Fixed.
Diff:
Modified: trunk/ide/ReportDesigner.py
===================================================================
--- trunk/ide/ReportDesigner.py 2010-06-15 22:38:28 UTC (rev 5891)
+++ trunk/ide/ReportDesigner.py 2010-06-16 19:50:24 UTC (rev 5892)
@@ -200,6 +200,12 @@
def onMoveToTop(evt):
self.ActiveEditor.sendToBack()
+ def onMoveUp(evt):
+ self.ActiveEditor.sendBackwards()
+
+ def onMoveDown(evt):
+ self.ActiveEditor.sendUpwards()
+
def onMoveToBottom(evt):
self.ActiveEditor.bringToFront()
@@ -269,8 +275,10 @@
if variableSelected or groupSelected:
menu.appendSeparator()
- menu.append(_("Move to top"), HotKey="Ctrl+H",
OnHit=onMoveToTop)
- menu.append(_("Move to bottom"),
HotKey="Ctrl+J", OnHit=onMoveToBottom)
+ menu.append(_("Move to top"),
HotKey="Ctrl+Shift+H", OnHit=onMoveToTop)
+ menu.append(_("Move up"), HotKey="Ctrl+H",
OnHit=onMoveUp)
+ menu.append(_("Move down"), HotKey="Ctrl+J",
OnHit=onMoveDown)
+ menu.append(_("Move to bottom"),
HotKey="Ctrl+Shift+J", OnHit=onMoveToBottom)
return menu
@@ -2334,6 +2342,13 @@
def bringToFront(self):
self._arrange("bringToFront")
+ def sendBackwards(self):
+ self._arrange("sendBackwards")
+
+ def sendUpwards(self):
+ self._arrange("sendUpwards")
+
+
def _arrange(self, mode):
toRedraw = []
for selObj in rdc.SelectedObjects:
@@ -2357,15 +2372,24 @@
del objects[idx]
if mode == "sendToBack":
objects.insert(0, obj)
+ elif mode == "sendBackwards":
+ objects.insert(max(idx-1, 0), obj)
+ elif mode == "sendUpwards":
+ objects.insert(min(idx+1,
len(objects)), obj)
else:
objects.append(obj)
if parentObj not in toRedraw:
toRedraw.append(parentObj)
- for parent in toRedraw:
- if hasattr(parent, "DesignerObject"):
- parent.DesignerObject.refresh()
+ if rdc.ReportForm in toRedraw:
+ # must redraw the entire design surface (if e.g. a
group changed position)
+ self.propsChanged(reinit=True)
+ else:
+ # only need to redraw selected object(s)
+ for parent in toRedraw:
+ if hasattr(parent, "DesignerObject"):
+ parent.DesignerObject.refresh()
if toRedraw:
rdc.refreshTree()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]