Browse files

Objects now comes with 'Schema' field filled with a default one:

'public' (issue #63)

Added the environment variable PGMODELER_TMP_DIR on startup scripts.
  • Loading branch information...
1 parent 9ec9b9b commit 5d1345204328af9f600453aae970f562c76fea2e @rkhaotix rkhaotix committed Dec 16, 2012
Showing with 14 additions and 2 deletions.
  1. +12 −2 libpgmodeler_ui/src/objetobasewidget.cpp
  2. +1 −0 start-pgmodeler.bat
  3. +1 −0 start-pgmodeler.sh
View
14 libpgmodeler_ui/src/objetobasewidget.cpp
@@ -220,7 +220,13 @@ void ObjetoBaseWidget::definirAtributos(ModeloBD *modelo, OperationList *lista_o
comentario_edt->setText(QString::fromUtf8(objeto->getComment()));
sel_dono->definirObjeto(objeto->getOwner());
- sel_esquema->definirObjeto(objeto->getSchema());
+
+ //Caso o objeto não possua um esquema, preenche o campo com o esquema public
+ if(!objeto->getSchema())
+ sel_esquema->definirObjeto(modelo->obterObjeto("public", OBJ_SCHEMA));
+ else
+ sel_esquema->definirObjeto(objeto->getSchema());
+
sel_esptabela->definirObjeto(objeto->getTablespace());
/* Exibe o frame de objeto protegido caso o mesmo esteja protegido
@@ -238,7 +244,11 @@ void ObjetoBaseWidget::definirAtributos(ModeloBD *modelo, OperationList *lista_o
janela_pai->aplicar_ok_btn->setEnabled(!protegido);
}
- else obj_protegido_frm->setVisible(false);
+ else
+ {
+ obj_protegido_frm->setVisible(false);
+ sel_esquema->definirObjeto(modelo->obterObjeto("public", OBJ_SCHEMA));
+ }
}
void ObjetoBaseWidget::configurarLayouFormulario(QGridLayout *grid, ObjectType tipo_obj)
View
1 start-pgmodeler.bat
@@ -3,6 +3,7 @@
@set PGMODELER_SCHEMAS_DIR=%PGMODELER_ROOT%\schemas
@set PGMODELER_LANG_DIR=%PGMODELER_ROOT%\lang
@set PGMODELER_PLUGINS_DIR=%PGMODELER_ROOT%\plugins
+@set PGMODELER_TMP_DIR=%PGMODELER_ROOT%\tmp
@set PGMODELER_LIB_DIR=%PGMODELER_ROOT%\lib
@set PATH=%PGMODELER_LIB_DIR%;%PATH%
View
1 start-pgmodeler.sh
@@ -3,6 +3,7 @@ export PGMODELER_ROOT="`pwd`"
export PGMODELER_CONF_DIR=$PGMODELER_ROOT/conf
export PGMODELER_SCHEMAS_DIR=$PGMODELER_ROOT/schemas
export PGMODELER_LANG_DIR=$PGMODELER_ROOT/lang
+export PGMODELER_TMP_DIR=$PGMODELER_ROOT/tmp
export PGMODELER_PLUGINS_DIR=$PGMODELER_ROOT/plugins
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGMODELER_ROOT/lib

0 comments on commit 5d13452

Please sign in to comment.