[prev in list] [next in list] [prev in thread] [next in thread]
List: kstars-devel
Subject: [Kstars-devel]
From: Jérome_SONRIER <jsid () emor3j ! fr ! eu ! org>
Date: 2011-07-14 18:53:55
Message-ID: 20110714185355.3A304A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 69cf2fbf30fea7ad67f74db831e86e58bdd25c24 by Jérome SONRIER.
Committed on 14/07/2011 at 20:45.
Pushed by jsonrier into branch 'master'.
Attach labels to the curves in Alt vs Time tool.
CCBUG: 115518
CCMAIL: kstars-devel@kde.org
M +7 -1 kstars/tools/altvstime.cpp
http://commits.kde.org/kstars/69cf2fbf30fea7ad67f74db831e86e58bdd25c24
diff --git a/kstars/tools/altvstime.cpp b/kstars/tools/altvstime.cpp
index fa7b798..e98de63 100644
--- a/kstars/tools/altvstime.cpp
+++ b/kstars/tools/altvstime.cpp
@@ -247,7 +247,13 @@ void AltVsTime::processObject( SkyObject *o, bool forceAdd ) {
//add new curve with width=2, and color=white
KPlotObject *po = new KPlotObject( Qt::white, KPlotObject::Lines, 2.0 );
for ( double h=-12.0; h<=12.0; h+=0.5 ) {
- po->addPoint( h, findAltitude( o, h ) );
+ int label_pos = -11.0 + avtUI->View->plotObjects().count();
+ while ( label_pos > 11.0 )
+ label_pos -= 23.0;
+ if( h == label_pos )
+ po->addPoint( h, findAltitude( o, h ), o->translatedName() );
+ else
+ po->addPoint( h, findAltitude( o, h ) );
}
avtUI->View->addPlotObject( po );
_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic