summaryrefslogtreecommitdiffstats
path: root/clients/tde/src/app
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-20 14:10:10 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-20 14:10:10 -0500
commit9c3d84d0df528e8463906ac6399d651792b7ade6 (patch)
tree499ef6438918f70f499fb0661ceb9c3382cf5107 /clients/tde/src/app
parent0f3b0430e86e45b4a2fca4bc68b013c7f1b484aa (diff)
downloadulab-9c3d84d0df528e8463906ac6399d651792b7ade6.tar.gz
ulab-9c3d84d0df528e8463906ac6399d651792b7ade6.zip
Fix FPGA programmer
Diffstat (limited to 'clients/tde/src/app')
-rw-r--r--clients/tde/src/app/views/instrumentview.cpp18
-rw-r--r--clients/tde/src/app/views/instrumentview.h2
2 files changed, 13 insertions, 7 deletions
diff --git a/clients/tde/src/app/views/instrumentview.cpp b/clients/tde/src/app/views/instrumentview.cpp
index 3182bc1..9f4b061 100644
--- a/clients/tde/src/app/views/instrumentview.cpp
+++ b/clients/tde/src/app/views/instrumentview.cpp
@@ -62,7 +62,7 @@ bool InstrumentView::eventFilter(TQObject *o, TQEvent *e) {
if (childPartWidget) {
if (o == childPartWidget) {
if (e->type() == TQEvent::Resize) {
- setChildSizeToHint();
+ setChildSizeData();
}
}
}
@@ -71,7 +71,7 @@ bool InstrumentView::eventFilter(TQObject *o, TQEvent *e) {
return FALSE;
}
-void InstrumentView::setChildSizeToHint() {
+void InstrumentView::setChildSizeData() {
if (m_instrumentPart) {
TQWidget *childPartWidget = m_instrumentPart->widget();
if (childPartWidget) {
@@ -79,8 +79,14 @@ void InstrumentView::setChildSizeToHint() {
setFixedSize(childPartWidget->sizeHint());
}
else {
- TQSize childSizeHint = childPartWidget->sizeHint();
- setMinimumSize(childSizeHint.width(), childSizeHint.height());
+ TQSize minimumSizeHint;
+ if (childPartWidget->layout()) {
+ minimumSizeHint = childPartWidget->layout()->minimumSize();
+ }
+ else {
+ minimumSizeHint = childPartWidget->minimumSize();
+ }
+ setMinimumSize(minimumSizeHint.width(), minimumSizeHint.height());
resize(childPartWidget->size());
}
}
@@ -93,11 +99,11 @@ void InstrumentView::setUsingFixedSize(bool fixed) {
setMinimumSize(0, 0);
setMaximumSize(TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX);
}
- setChildSizeToHint();
+ setChildSizeData();
}
void InstrumentView::resizeEvent(TQResizeEvent *) {
- setChildSizeToHint();
+ setChildSizeData();
}
TQPtrList<KAction> InstrumentView::menuActionList() {
diff --git a/clients/tde/src/app/views/instrumentview.h b/clients/tde/src/app/views/instrumentview.h
index ed592dd..fa4551a 100644
--- a/clients/tde/src/app/views/instrumentview.h
+++ b/clients/tde/src/app/views/instrumentview.h
@@ -39,7 +39,7 @@ class InstrumentView : public KMdiChildView
private slots:
void setStatusMessage(const TQString& message);
void setUsingFixedSize(bool fixed);
- void setChildSizeToHint();
+ void setChildSizeData();
signals:
void statusMessageSet(const TQString&);