summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-10 10:49:46 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-10 10:49:46 (GMT)
commitb19391ed6a6106a048ae0fbcaea80eda286add69 (patch)
treee7bbd64cb7b08d73658b44df043f694f07df9795
parentf40ddf7208ae3a0f23b04fb880db708d325d8af0 (diff)
Improve GUI. Fix resume/suspend action
-rw-r--r--kstars/ekos/guide/guide.cpp10
-rw-r--r--kstars/ekos/guide/guide.ui13
2 files changed, 19 insertions, 4 deletions
diff --git a/kstars/ekos/guide/guide.cpp b/kstars/ekos/guide/guide.cpp
index f7473e5..5d77adf 100644
--- a/kstars/ekos/guide/guide.cpp
+++ b/kstars/ekos/guide/guide.cpp
@@ -962,7 +962,10 @@ bool Guide::suspend()
if (state == GUIDE_SUSPENDED)
return true;
- return guider->suspend();
+ if (state == GUIDE_GUIDING)
+ return guider->suspend();
+ else
+ return false;
}
bool Guide::resume()
@@ -970,7 +973,10 @@ bool Guide::resume()
if (state == GUIDE_GUIDING)
return true;
- return guider->resume();
+ if (state == GUIDE_SUSPENDED)
+ return guider->resume();
+ else
+ return false;
}
void Guide::setExposure(double value)
diff --git a/kstars/ekos/guide/guide.ui b/kstars/ekos/guide/guide.ui
index e03407b..b450d17 100644
--- a/kstars/ekos/guide/guide.ui
+++ b/kstars/ekos/guide/guide.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>681</width>
- <height>486</height>
+ <width>686</width>
+ <height>505</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
@@ -629,6 +629,12 @@
<layout class="QVBoxLayout" name="rightLayout">
<item>
<widget class="QWidget" name="guideWidget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="minimumSize">
<size>
<width>320</width>
@@ -1039,6 +1045,9 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Preferred</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>