Skip to content

Commit 4903055

Browse files
committed
Recall latest window position upon open
1 parent 93d7296 commit 4903055

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Batch.roboFontExt/lib/batch.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ def started(self):
154154
for identifier in list(items.keys()):
155155
if identifier not in possibleIdentifiers:
156156
del items[identifier]
157+
158+
# position the window where it was last
159+
wx, wy, ww, wh = self.w.getPosSize()
160+
posSize = getExtensionDefault("com.typemytype.batch.windowPosSize", fallback=(wx, wy, ww, wh))
161+
self.w.setPosSize(posSize)
162+
157163
self.w.setItemValues(items)
158164
self.w.open()
159165

@@ -163,6 +169,7 @@ def destroy(self):
163169
if identifier in items:
164170
del items[identifier]
165171
setExtensionDefault("com.typemytype.batch", items)
172+
setExtensionDefault("com.typemytype.batch.windowPosSize", self.w.getPosSize())
166173

167174
def sourcesAddRemoveButtonAddCallback(self, sender):
168175
# add item

0 commit comments

Comments
 (0)