Mercurial > fife-parpg
changeset 371:3827b510546f
Editor:
* Plugins will be loaded by default, so users do not have to edit their configuration files each time they install a plugin
* Changed the object selector so it does not autoscroll when the user manually picks an object from the list
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 20 Nov 2009 00:03:39 +0000 |
parents | 5ab78cd39534 |
children | e94cd7d1dab6 |
files | clients/editor/plugins/ObjectSelector.py clients/editor/scripts/plugin.py |
diffstat | 2 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/clients/editor/plugins/ObjectSelector.py Mon Nov 16 12:29:29 2009 +0000 +++ b/clients/editor/plugins/ObjectSelector.py Fri Nov 20 00:03:39 2009 +0000 @@ -344,25 +344,28 @@ been selected. @param obj: fife.Object instance""" - self.setPreview(obj) - events.onObjectSelected.send(sender=self, object=obj) - - self.gui.adaptLayout(False) # Set preview image - def setPreview(self, object): + def setPreview(self, object, sender=None): if not object: return if self.object and object == self.object: return - + self.object = object - self.scrollToObject(object) + + # We do not want to autoscroll the list when the user manually + # selects an object from the object selector + if sender is not self: + self.scrollToObject(object) + self.preview.image = self._getImage(object) height = self.preview.image.getHeight(); if height > 200: height = 200 self.preview.parent.max_height = height + self.gui.adaptLayout(False) + def scrollToObject(self, object): # Select namespace names = self.namespaces
--- a/clients/editor/scripts/plugin.py Mon Nov 16 12:29:29 2009 +0000 +++ b/clients/editor/scripts/plugin.py Fri Nov 20 00:03:39 2009 +0000 @@ -45,7 +45,7 @@ files.append(os.path.splitext(f)[0]) for f in files: - importPlugin = self._settings.get("Plugins", f, False) + importPlugin = self._settings.get("Plugins", f, True) if importPlugin: try: print "Importing plugin:", f