dabo Commit
Revision 5161
Date: 2009-03-31 15:38:37 -0700 (Tue, 31 Mar 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5161
Changed:
U trunk/ide/ReportDesigner.py
Log:
Made some usability improvements to ReportDesigner:
1) If an object is selected, and <enter> pressed, focus to prop sheet 'expr'
prop.
(previously, <ctrl>+<enter> would do this). Also, double-click still does
this.
2) If the propsheet 'expr' property was activated as in #1, once the user is
done
editing the property, focus automatically goes back to the designer.
These changes enable working with the report designer without needing the mouse
or
a lot of extra key combinations. Note that <tab> and <shift>+<tab> will iterate
forward/backward through the objects in the designer, so my workflow today has
been:
1) Add a string object, copy/paste 8 times.
2) Select top object, press <enter>
3) Edit expr property, press <enter>
4) Press <tab>
5) Repeat steps 3-4 8 times.
I'm working on a report with over 120 individual objects in the detail band,
with
stacks of 8-9 like items. So working on this caused me to wish for better
usability,
hence this commit.
Diff:
Modified: trunk/ide/ReportDesigner.py
===================================================================
--- trunk/ide/ReportDesigner.py 2009-03-31 17:39:01 UTC (rev 5160)
+++ trunk/ide/ReportDesigner.py 2009-03-31 22:38:37 UTC (rev 5161)
@@ -244,7 +244,7 @@
def showPropSheet(self, bringToTop=False, refresh=False,
prop=None,
- enableEditor=False):
+ enableEditor=False, focusBack=False):
ps = self.PropSheet
if ps is None:
refresh = True
@@ -268,6 +268,8 @@
for idx, record in enumerate(ds):
if record["prop"].lower() ==
prop.lower():
pg.CurrentRow = idx
+ if focusBack:
+ pg._focusToDesigner =
True
break
if bringToTop:
@@ -767,7 +769,11 @@
if isinstance(obj, Group) and prop.lower() == "expr":
reInit = True
rdc.ActiveEditor.propsChanged(reinit=reInit)
- rdc.ObjectTree.refreshCaption()
+ if rdc.ObjectTree:
+ rdc.ObjectTree.refreshCaption()
+ if getattr(self.propGrid, "_focusToDesigner", False):
+ rdc.ActiveEditor.Form.bringToFront()
+ self.propGrid._focusToDesigner = False
def refreshSelection(self):
objs = rdc.SelectedObjects
@@ -1690,7 +1696,7 @@
if not selectedDrawables:
return
- if ctrlDown and key == "enter":
+ if key == "enter":
# Bring the prop sheet to top and activate the editor
for the
# most appropriate property for the selected object(s).
evt.stop()
@@ -1701,7 +1707,8 @@
break
self.editProperty(propName)
- elif key != "enter":
+ else:
+ ## arrow key
evt.stop() ## don't let the arrow key scroll the
window.
size, turbo = False, False
if shiftDown:
@@ -1815,8 +1822,10 @@
"""Display the property dialog, and bring it to top.
If a valid propname is passed, start the editor for that
property.
+ After the property is edited, send focus back to the designer.
"""
- rdc.showPropSheet(bringToTop=True, prop=prop, enableEditor=True)
+ rdc.showPropSheet(bringToTop=True, prop=prop, enableEditor=True,
+ focusBack=True)
def promptToSave(self):
_______________________________________________
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]