Commit e39e6314 authored by Claes Sjofors's avatar Claes Sjofors

Xtt method open graph for multiview

parent 0a57b45c
......@@ -361,6 +361,11 @@ void Xtt::activate_opengraph()
if ( cdh_tidIsCid( classid)) {
switch ( classid) {
case pwr_cClass_XttMultiView:
// Open multiview
sprintf( cmd, "open mult /name=%s", vname);
xnav->command( cmd);
return;
case pwr_cClass_DsTrend:
case pwr_cClass_DsTrendCurve:
// Open trend
......
......@@ -347,7 +347,7 @@ static pwr_tStatus OpenTrend( xmenu_sMenuCall *ip)
strcat( name, ".DefTrend");
sts = gdh_GetObjectInfo( name, (void *)&deftrend, sizeof(deftrend));
if ( ODD(sts) && cdh_ObjidIsNotNull( deftrend.Objid)) {
// Default XttGraph found
// Default Trend found
sts = gdh_GetAttrRefTid( &deftrend, &classid);
if ( ODD(sts) &&
(classid == pwr_cClass_DsTrend ||
......@@ -426,7 +426,7 @@ static pwr_tStatus OpenTrendFilter( xmenu_sMenuCall *ip)
strcat( name, ".YObjectName[0]");
sts = gdh_GetObjectInfo( name, (void *)&deftrend, sizeof(deftrend));
if ( ODD(sts) && cdh_ObjidIsNotNull( deftrend.Objid)) {
// Default XttGraph found
// Default Trend found
sts = gdh_GetAttrRefTid( &deftrend, &classid);
if ( ODD(sts) && classid == pwr_cClass_DsTrend)
return XNAV__SUCCESS;
......@@ -443,7 +443,7 @@ static pwr_tStatus OpenTrendFilter( xmenu_sMenuCall *ip)
strcat( name, ".DefTrend");
sts = gdh_GetObjectInfo( name, (void *)&deftrend, sizeof(deftrend));
if ( ODD(sts) && cdh_ObjidIsNotNull( deftrend.Objid)) {
// Default XttGraph found
// Default Trend found
sts = gdh_GetAttrRefTid( &deftrend, &classid);
if ( ODD(sts) &&
(classid == pwr_cClass_DsTrend ||
......@@ -514,7 +514,7 @@ static pwr_tStatus OpenHistory( xmenu_sMenuCall *ip)
strcat( name, ".DefHistory");
sts = gdh_GetObjectInfo( name, (void *)&defhist, sizeof(defhist));
if ( ODD(sts) && cdh_ObjidIsNotNull( defhist.Objid)) {
// Default XttGraph found
// Default History found
sts = gdh_GetAttrRefTid( &defhist, &classid);
if ( ODD(sts) &&
(classid == pwr_cClass_SevHist || classid == pwr_cClass_SevHistObject || classid == pwr_cClass_PlotGroup)) {
......@@ -601,7 +601,7 @@ static pwr_tStatus OpenHistoryFilter( xmenu_sMenuCall *ip)
strcat( name, ".DefHist");
sts = gdh_GetObjectInfo( name, (void *)&defhist, sizeof(defhist));
if ( ODD(sts) && cdh_ObjidIsNotNull( defhist.Objid)) {
// Default XttGraph found
// Default History found
sts = gdh_GetAttrRefTid( &defhist, &classid);
if ( ODD(sts) &&
(classid == pwr_cClass_SevHist || classid == pwr_cClass_SevHistObject || classid == pwr_cClass_PlotGroup))
......@@ -666,7 +666,7 @@ static pwr_tStatus OpenFast( xmenu_sMenuCall *ip)
strcat( name, ".DefFast");
sts = gdh_GetObjectInfo( name, (void *)&deffast, sizeof(deffast));
if ( ODD(sts) && cdh_ObjidIsNotNull( deffast.Objid)) {
// Default XttGraph found
// Default Fast found
sts = gdh_GetAttrRefTid( &deffast, &classid);
if ( ODD(sts) &&
classid == pwr_cClass_DsFastCurve) {
......@@ -741,7 +741,7 @@ static pwr_tStatus OpenFastFilter( xmenu_sMenuCall *ip)
strcat( name, ".DefFast");
sts = gdh_GetObjectInfo( name, (void *)&deffast, sizeof(deffast));
if ( ODD(sts) && cdh_ObjidIsNotNull( deffast.Objid)) {
// Default XttGraph found
// Default Fast found
sts = gdh_GetAttrRefTid( &deffast, &classid);
if ( ODD(sts) &&
classid == pwr_cClass_DsFastCurve)
......@@ -900,6 +900,13 @@ static pwr_tStatus OpenGraph( xmenu_sMenuCall *ip)
sts = ((XNav *)ip->EditorContext)->command( cmd);
return XNAV__SUCCESS;
}
else if ( classid == pwr_cClass_XttMultiView) {
sts = gdh_AttrrefToName( objar, name, sizeof(name), cdh_mNName);
strcpy( cmd, "ope mult/name=");
strcat( cmd, name);
sts = ((XNav *)ip->EditorContext)->command( cmd);
return XNAV__SUCCESS;
}
while( ODD(sts)) {
sts = gdh_AttrrefToName( &aref, name, sizeof(name),
......@@ -920,6 +927,13 @@ static pwr_tStatus OpenGraph( xmenu_sMenuCall *ip)
sts = ((XNav *)ip->EditorContext)->command( cmd);
break;
}
else if ( classid == pwr_cClass_XttMultiView) {
sts = gdh_AttrrefToName( &defgraph, name, sizeof(name), cdh_mNName);
strcpy( cmd, "ope mult/name=");
strcat( cmd, name);
sts = ((XNav *)ip->EditorContext)->command( cmd);
break;
}
}
if ( aref.Flags.b.Object) {
......@@ -957,7 +971,8 @@ static pwr_tStatus OpenGraphFilter( xmenu_sMenuCall *ip)
sts = gdh_GetAttrRefTid( objar, &classid);
if ( EVEN(sts)) return sts;
if ( classid == pwr_cClass_XttGraph)
if ( classid == pwr_cClass_XttGraph ||
classid == pwr_cClass_XttMultiView)
return XNAV__SUCCESS;
while( ODD(sts)) {
......@@ -990,6 +1005,8 @@ static pwr_tStatus OpenGraphFilter( xmenu_sMenuCall *ip)
}
return XNAV__SUCCESS;
}
else if ( classid == pwr_cClass_XttMultiView)
return XNAV__SUCCESS;
}
if ( aref.Flags.b.Object) {
......
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