Skip to content

Commit

Permalink
Try to resolve problem with small resolution #241
Browse files Browse the repository at this point in the history
  • Loading branch information
KraTuX31 committed Apr 14, 2015
1 parent 4ba1d5a commit 43570af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/gui/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ int MainWindow::getCurrentTableId(QTableView *tbl) {
}

int MainWindow::getCurrentCustomerId() {
mergeDocks();
return getCurrentTableId(ui->tblCustomers);
}

Expand Down Expand Up @@ -155,9 +156,7 @@ void MainWindow::addDoc(bool isBilling) {

void MainWindow::resizeEvent(QResizeEvent *event)
{
if (height() < 540) {
tabifyDockWidget(ui->dockUserData, ui->dockCustomerData);
}
mergeDocks();

switch (ui->stackedWidget->currentIndex()) {
case 0:
Expand Down Expand Up @@ -363,6 +362,12 @@ void MainWindow::lockProject() {
updateTableProjects(getCurrentCustomerId());
}

void MainWindow::mergeDocks() {
if (height() < 540) {
tabifyDockWidget(ui->dockUserData, ui->dockCustomerData);
}
}

void MainWindow::editUser()
{
if (UserDataDialog().exec()) {
Expand Down
2 changes: 2 additions & 0 deletions src/gui/mainwindow/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ public slots:
* @brief lockProject Lock the current project
*/
void lockProject();

void mergeDocks();
private slots:
/**
* @brief MainWindow::openContextualMenuTable open contextual menu
Expand Down

0 comments on commit 43570af

Please sign in to comment.