[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Sep 11 19:26:44 UTC 2012
SVN commit 1315883 by netterfield:
-Fix bug in context menues which was introduced when fixing clang
warnings
-Store the index vector with the kst file
M +3 -0 libkst/datavector.cpp
M +6 -0 libkst/vectorfactory.cpp
M +1 -1 libkstapp/scene.cpp
M +1 -2 libkstapp/view.cpp
M +1 -1 libkstapp/view.h
--- branches/work/kst/portto4/kst/src/libkst/datavector.cpp #1315882:1315883
@@ -297,6 +297,9 @@
s.writeAttribute("doAve", "false");
}
+ s.writeAttribute("startUnits", startUnits());
+ s.writeAttribute("rangeUnits", rangeUnits());
+
saveNameInfo(s, VNUM|XNUM);
s.writeEndElement();
}
--- branches/work/kst/portto4/kst/src/libkst/vectorfactory.cpp #1315882:1315883
@@ -226,6 +226,8 @@
QString descriptiveName;
int start=0, count=0, skip = -1;
bool doAve=false;
+ QString start_units;
+ QString range_units;
while (!xml.atEnd()) {
const QString n = xml.name().toString();
@@ -240,6 +242,8 @@
count = attrs.value("count").toString().toInt();
skip = attrs.value("skip").toString().toInt();
doAve = attrs.value("doAve").toString() == "true" ? true : false;
+ start_units = attrs.value("startUnits").toString();
+ range_units = attrs.value("rangeUnits").toString();
// set overrides if set from command line
if (!store->override.fileName.isEmpty()) {
@@ -304,6 +308,8 @@
doAve);
vector->setDescriptiveName(descriptiveName);
+ vector->setStartUnits(start_units);
+ vector->setRangeUnits(range_units);
vector->registerChange();
vector->unlock();
--- branches/work/kst/portto4/kst/src/libkstapp/scene.cpp #1315882:1315883
@@ -41,7 +41,7 @@
QList<QGraphicsItem*> list = items(event->scenePos());
if (list.isEmpty()) {
if (View *view = qobject_cast<View*>(parent())) {
- view->contextMenuEvent();
+ view->viewContextMenuEvent();
}
} else {
foreach (QGraphicsItem *item, list) {
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1315882:1315883
@@ -675,8 +675,7 @@
}
-void View::contextMenuEvent( QContextMenuEvent * event ) {
- Q_UNUSED(event)
+void View::viewContextMenuEvent() {
QMenu menu;
addTitle(&menu);
--- branches/work/kst/portto4/kst/src/libkstapp/view.h #1315882:1315883
@@ -104,7 +104,7 @@
void setDataMode(bool dataMode) { _dataMode = dataMode; }
bool isDataMode() { return _dataMode; }
- virtual void contextMenuEvent( QContextMenuEvent * event = 0);
+ virtual void viewContextMenuEvent();
bool plotBordersDirty() const {return _plotBordersDirty;}
void setPlotBordersDirty(bool dirty) {_plotBordersDirty = dirty;}
More information about the Kst
mailing list