Commit c51ce42e authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Merge branch 'master' of git://anongit.kde.org/kstars

parents 68f27715 d690d0bf
......@@ -1320,7 +1320,9 @@ void Guide::syncTrackingBoxPosition()
// If box size is larger than image size, set it to lower index
if (boxSize/subBinX >= w || boxSize/subBinY >= h)
{
boxSizeCombo->setCurrentIndex(boxSizeCombo->currentIndex()-1);
int newIndex = boxSizeCombo->currentIndex()-1;
if (newIndex >= 0)
boxSizeCombo->setCurrentIndex(newIndex);
return;
}
......@@ -1457,9 +1459,11 @@ bool Guide::setGuiderType(int type)
void Guide::updateTrackingBoxSize(int currentIndex)
{
Options::setGuideSquareSizeIndex(currentIndex);
syncTrackingBoxPosition();
if (currentIndex >= 0)
{
Options::setGuideSquareSizeIndex(currentIndex);
syncTrackingBoxPosition();
}
}
bool Guide::selectAutoStar()
......@@ -1987,12 +1991,10 @@ bool Guide::executeOneOperation(GuideState operation)
// Do not subframe if we are capturing calibration frame
if (subFramed == false && Options::guideSubframeEnabled() == true && targetChip->canSubframe())
{
int minX, maxX, minY, maxY, minW, maxW, minH, maxH;//, fx,fy,fw,fh;
int minX, maxX, minY, maxY, minW, maxW, minH, maxH;
targetChip->getFrameMinMax(&minX, &maxX, &minY, &maxY, &minW, &maxW, &minH, &maxH);
int offset = boxSizeCombo->currentText().toInt()/subBinX;
//int x = guideView->getTrackingBox().x() + guideView->getTrackingBox().width()/2;
//int y = guideView->getTrackingBox().y() + guideView->getTrackingBox().height()/2;
int offset = boxSizeCombo->currentText().toInt()/subBinX;
int x = starCenter.x();
int y = starCenter.y();
......
......@@ -195,7 +195,6 @@ public:
QVector3D getStarPosition() { return starCenter; }
// Tracking Box
void setTrackingBoxSize(int index) { boxSizeCombo->setCurrentIndex(index); }
int getTrackingBoxSize() { return boxSizeCombo->currentText().toInt(); }
//void startRapidGuide();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment