Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/openalea/lpy/gui/objectdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from openalea.plantgl.gui.qt.QtCore import QObject, pyqtSignal
from openalea.plantgl.gui.qt.QtWidgets import QApplication, QCheckBox, QDialog, QHBoxLayout, QLayout, QMenuBar, QPushButton, QSizePolicy, QSpacerItem, QVBoxLayout


class ObjectDialog(QDialog):
"""the class that will create dialog between the panel and the editor window"""
valueChanged = pyqtSignal()
Expand All @@ -25,7 +25,9 @@ def __init__(self, *args):

def setupUi(self,editor):
self.setObjectName("ObjectDialog")
self.resize(389, 282)
self.setBaseSize(600,400)
self.setMinimumHeight(200)
self.setMinimumWidth(300)
self.verticalLayout = QVBoxLayout(self)
self.verticalLayout.setSpacing(2)
self.verticalLayout.setContentsMargins(2, 2, 2, 2)
Expand Down Expand Up @@ -74,7 +76,7 @@ def setupUi(self,editor):
self.applyButton.pressed.connect(self.__apply)
self.autoUpdateCheckBox.toggled.connect(self.setAutomaticUpdate)
self.objectView.valueChanged.connect(self.__valueChanged)

def menu(self):
return self._menu

Expand Down Expand Up @@ -107,6 +109,3 @@ def setAutomaticUpdate(self,value):
self.__apply()


def closeEvent(self,event):
QDialog.closeEvent(self,event)

5 changes: 4 additions & 1 deletion src/openalea/lpy/gui/objectpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,19 @@ def startObjectEdition(self,obj,id):

def endObjectEdition(self):
if self.editor:
self.editorDialog.hide()
self.editorDialog.hide()

def getEditedObject(self):
""" used by panel. ask for object edition to start. Use getEditor and setObjectToEditor """
if not self.editedobjectid is None:
return self.manager.retrieveObjectFromEditor(self.editor),self.editedobjectid
else:
return None, None #function must always return a tuple

def endEditionEvent(self):
""" called when closing editor. """
self.editedobjectid = None
self.editor = None

def isVisible(self):
""" Tell whether editor is visible """
Expand Down