double clicking in the center of a graph will now bring up the graph edit attributes dialog box even if no raw file is loaded
This commit is contained in:
parent
a329b996d6
commit
e5015488f3
|
|
@ -36,7 +36,7 @@ static int waves_selected(int event, KeySym key, int state, int button)
|
||||||
rstate = state; /* rstate does not have ShiftMask bit, so easier to test for KeyPress events */
|
rstate = state; /* rstate does not have ShiftMask bit, so easier to test for KeyPress events */
|
||||||
rstate &= ~ShiftMask; /* don't use ShiftMask, identifying characters is sifficient */
|
rstate &= ~ShiftMask; /* don't use ShiftMask, identifying characters is sifficient */
|
||||||
if(xctx->ui_state & excl) skip = 1;
|
if(xctx->ui_state & excl) skip = 1;
|
||||||
else if(sch_waves_loaded() < 0 ) skip = 1;
|
else if(event != -3 && sch_waves_loaded() < 0 ) skip = 1;
|
||||||
else if(SET_MODMASK) skip = 1;
|
else if(SET_MODMASK) skip = 1;
|
||||||
else if(event == MotionNotify && (state & Button2Mask)) skip = 1;
|
else if(event == MotionNotify && (state & Button2Mask)) skip = 1;
|
||||||
else if(event == MotionNotify && (state & Button1Mask) && (state & ShiftMask)) skip = 1;
|
else if(event == MotionNotify && (state & Button1Mask) && (state & ShiftMask)) skip = 1;
|
||||||
|
|
@ -357,7 +357,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
||||||
int track_dset = -2; /* used to find dataset of closest wave to mouse if 't' is pressed */
|
int track_dset = -2; /* used to find dataset of closest wave to mouse if 't' is pressed */
|
||||||
xRect *r = NULL;
|
xRect *r = NULL;
|
||||||
|
|
||||||
if(!xctx->raw) return 0;
|
if(event != -3 && !xctx->raw) return 0;
|
||||||
rstate = state; /* rstate does not have ShiftMask bit, so easier to test for KeyPress events */
|
rstate = state; /* rstate does not have ShiftMask bit, so easier to test for KeyPress events */
|
||||||
rstate &= ~ShiftMask; /* don't use ShiftMask, identifying characters is sifficient */
|
rstate &= ~ShiftMask; /* don't use ShiftMask, identifying characters is sifficient */
|
||||||
|
|
||||||
|
|
@ -584,7 +584,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
||||||
} else {
|
} else {
|
||||||
need_all_redraw = 1;
|
need_all_redraw = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else if(xctx->raw) {
|
||||||
xctx->raw->annot_p = -1;
|
xctx->raw->annot_p = -1;
|
||||||
xctx->raw->annot_sweep_idx = -1;
|
xctx->raw->annot_sweep_idx = -1;
|
||||||
/* need_all_redraw = 1; */
|
/* need_all_redraw = 1; */
|
||||||
|
|
@ -688,7 +688,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
||||||
dbg(1, "graph_master=%d\n", xctx->graph_master);
|
dbg(1, "graph_master=%d\n", xctx->graph_master);
|
||||||
|
|
||||||
/* parameters for absolute positioning by mouse drag in bottom graph area */
|
/* parameters for absolute positioning by mouse drag in bottom graph area */
|
||||||
if( event == MotionNotify && (state & Button1Mask) && xctx->graph_bottom ) {
|
if( xctx->raw && event == MotionNotify && (state & Button1Mask) && xctx->graph_bottom ) {
|
||||||
int idx;
|
int idx;
|
||||||
int dset;
|
int dset;
|
||||||
double wwx1, wwx2, pp, delta, ccx, ddx;
|
double wwx1, wwx2, pp, delta, ccx, ddx;
|
||||||
|
|
|
||||||
|
|
@ -2565,8 +2565,8 @@ proc graph_update_nodelist {} {
|
||||||
|
|
||||||
proc graph_fill_listbox {} {
|
proc graph_fill_listbox {} {
|
||||||
global graph_selected
|
global graph_selected
|
||||||
|
if { [xschem raw loaded] == -1 } return
|
||||||
set retval [.graphdialog.center.left.search get]
|
set retval [.graphdialog.center.left.search get]
|
||||||
|
|
||||||
set autoload [uplevel #0 {subst [xschem getprop rect 2 $graph_selected autoload 2]}]
|
set autoload [uplevel #0 {subst [xschem getprop rect 2 $graph_selected autoload 2]}]
|
||||||
set rawfile [uplevel #0 {subst [xschem getprop rect 2 $graph_selected rawfile 2]}]
|
set rawfile [uplevel #0 {subst [xschem getprop rect 2 $graph_selected rawfile 2]}]
|
||||||
set sim_type [uplevel #0 {subst [xschem getprop rect 2 $graph_selected sim_type 2]}]
|
set sim_type [uplevel #0 {subst [xschem getprop rect 2 $graph_selected sim_type 2]}]
|
||||||
|
|
@ -2728,7 +2728,6 @@ proc graph_edit_properties {n} {
|
||||||
pack .graphdialog.top3 -side top -fill x
|
pack .graphdialog.top3 -side top -fill x
|
||||||
pack .graphdialog.center -side top -fill both -expand yes
|
pack .graphdialog.center -side top -fill both -expand yes
|
||||||
pack .graphdialog.bottom -side top -fill x
|
pack .graphdialog.bottom -side top -fill x
|
||||||
|
|
||||||
# center-left frame
|
# center-left frame
|
||||||
label .graphdialog.center.left.labsearch -text Search:
|
label .graphdialog.center.left.labsearch -text Search:
|
||||||
entry .graphdialog.center.left.search -width 10
|
entry .graphdialog.center.left.search -width 10
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue