Skip to content

Commit

Permalink
Fixed a bug that was causing SQL commands to have line break removed
Browse files Browse the repository at this point in the history
(issue #615)

Fixed a bug that was causing dialogs blocking and incorrect form reset
when minimizing export and diff dialogs (issue #614)
  • Loading branch information
rkhaotix committed Feb 28, 2015
1 parent 4e0a8ca commit f0c24e9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
14 changes: 8 additions & 6 deletions libpgmodeler_ui/src/modeldatabasediffform.cpp
Expand Up @@ -96,6 +96,8 @@ ModelDatabaseDiffForm::ModelDatabaseDiffForm(QWidget *parent, Qt::WindowFlags f)
connect(select_file_tb, SIGNAL(clicked()), this, SLOT(selectOutputFile()));
connect(file_edt, SIGNAL(textChanged(QString)), this, SLOT(enableDiffMode()));
connect(force_recreation_chk, SIGNAL(toggled(bool)), recreate_unmod_chk, SLOT(setEnabled(bool)));

resetForm();
}
catch(Exception &e)
{
Expand All @@ -114,14 +116,14 @@ void ModelDatabaseDiffForm::setDatabaseModel(DatabaseModel *model)
source_model=model;
}

void ModelDatabaseDiffForm::showEvent(QShowEvent *)
void ModelDatabaseDiffForm::resetForm(void)
{
ConnectionsConfigWidget::fillConnectionsComboBox(connections_cmb);
connections_cmb->setEnabled(connections_cmb->count() > 0);
connection_lbl->setEnabled(connections_cmb->isEnabled());
connect_tb->setEnabled(connections_cmb->isEnabled());
enableDiffMode();
settings_tbw->setTabEnabled(1, false);
connections_cmb->setEnabled(connections_cmb->count() > 0);
connection_lbl->setEnabled(connections_cmb->isEnabled());
connect_tb->setEnabled(connections_cmb->isEnabled());
enableDiffMode();
settings_tbw->setTabEnabled(1, false);
settings_tbw->setTabEnabled(2, false);
}

Expand Down
4 changes: 2 additions & 2 deletions libpgmodeler_ui/src/modeldatabasediffform.h
Expand Up @@ -78,7 +78,6 @@ class ModelDatabaseDiffForm: public QDialog, public Ui::ModelDatabaseDiffForm {

bool process_paused;

void showEvent(QShowEvent *);
void closeEvent(QCloseEvent *event);

//! brief Creates the helpers and threads
Expand All @@ -91,7 +90,8 @@ class ModelDatabaseDiffForm: public QDialog, public Ui::ModelDatabaseDiffForm {
void destroyModel(void);

void clearOutput(void);
void resetButtons(void);
void resetForm(void);
void resetButtons(void);
void saveDiffToFile(void);
void finishDiff(void);

Expand Down
4 changes: 2 additions & 2 deletions libpgmodeler_ui/src/modelexportform.cpp
Expand Up @@ -137,7 +137,7 @@ void ModelExportForm::updateProgress(int progress, QString msg, ObjectType obj_t
}
}

void ModelExportForm::hideEvent(QHideEvent *)
/*void ModelExportForm::hideEvent(QHideEvent *)
{
this->model=nullptr;
file_edt->clear();
Expand All @@ -155,7 +155,7 @@ void ModelExportForm::hideEvent(QHideEvent *)
page_by_page_chk->setChecked(false);
connections_cmb->setCurrentIndex(0);
zoom_cmb->setCurrentText(QString("100%"));
}
}*/

void ModelExportForm::exportModel(void)
{
Expand Down
2 changes: 1 addition & 1 deletion libpgmodeler_ui/src/modelexportform.h
Expand Up @@ -56,7 +56,7 @@ class ModelExportForm: public QDialog, public Ui::ModelExportForm {

public slots:
void exec(ModelWidget *model);
void hideEvent(QHideEvent *);
//void hideEvent(QHideEvent *);

private slots:
void selectExportMode(void);
Expand Down
2 changes: 1 addition & 1 deletion libpgmodeler_ui/src/pgmodeleruins.cpp
Expand Up @@ -13,7 +13,7 @@ QTreeWidgetItem *PgModelerUiNS::createOutputTreeItem(QTreeWidget *output_trw, co

item=new QTreeWidgetItem(parent);
item->setIcon(0, ico);
label->setTextFormat(Qt::RichText);
label->setTextFormat(Qt::AutoText);
label->setText(text);
label->setWordWrap(word_wrap);
label->setTextInteractionFlags(Qt::TextSelectableByMouse);
Expand Down

0 comments on commit f0c24e9

Please sign in to comment.