summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 83b999e..2d09504 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -16,6 +16,7 @@ MainWindow::MainWindow() : QDialog()
inputLabel->setFont(f);
outputLabel->setFont(f);
cardLabel->setFont(f);
+ _originalSize = this->size();
}
MainWindow::~MainWindow()
@@ -122,6 +123,9 @@ void MainWindow::insertItemWidget(SlxOutput* w, bool isDevice)
void MainWindow::mark()
{
setUpdatesEnabled(false);
+ this->resize(_originalSize);
+ outputLabel->setMinimumWidth(0);
+ inputLabel->setMinimumWidth(0);
for (auto *w : _widgets) {
w->unused = true;
}
@@ -142,4 +146,8 @@ void MainWindow::sweep()
}
}
setUpdatesEnabled(true);
+ int width = qMax(outputLabel->width(), inputLabel->width());
+ this->resize(_originalSize);
+ outputLabel->setMinimumWidth(width);
+ inputLabel->setMinimumWidth(width);
}