global Options menu "show hidden texts" to show or not show texts with attribute "hide=true"
This commit is contained in:
parent
a3b7ec1810
commit
19d9d8a8f1
|
|
@ -418,6 +418,7 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
|
|||
#if HAS_CAIRO==1
|
||||
const char *textfont;
|
||||
#endif
|
||||
int show_hidden_texts = tclgetboolvar("show_hidden_texts");
|
||||
|
||||
if(xctx->inst[n].ptr == -1) return;
|
||||
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
|
||||
|
|
@ -546,7 +547,7 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
|
|||
{
|
||||
text = symptr->text[j];
|
||||
if(text.xscale*FONTWIDTH*xctx->mooz<1) continue;
|
||||
if(symptr->text[j].flags & HIDE_TEXT) continue;
|
||||
if(!show_hidden_texts && (symptr->text[j].flags & HIDE_TEXT)) continue;
|
||||
if( hide && text.txt_ptr && strcmp(text.txt_ptr, "@symname") && strcmp(text.txt_ptr, "@name") ) continue;
|
||||
txtptr= translate(n, text.txt_ptr);
|
||||
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
|
||||
|
|
@ -2959,6 +2960,7 @@ void draw(void)
|
|||
int c, i = 0;
|
||||
xSymbol *symptr;
|
||||
int textlayer;
|
||||
int show_hidden_texts = tclgetboolvar("show_hidden_texts");
|
||||
|
||||
#if HAS_CAIRO==1
|
||||
const char *textfont;
|
||||
|
|
@ -3078,7 +3080,7 @@ void draw(void)
|
|||
for(i=0;i<xctx->texts;i++)
|
||||
{
|
||||
textlayer = xctx->text[i].layer;
|
||||
if(xctx->text[i].flags & HIDE_TEXT) continue;
|
||||
if(!show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
|
||||
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
|
||||
dbg(1, "draw(): drawing string %d = %s\n",i, xctx->text[i].txt_ptr);
|
||||
#if HAS_CAIRO==1
|
||||
|
|
|
|||
|
|
@ -507,6 +507,7 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot,
|
|||
xPoly polygon;
|
||||
xSymbol *symptr;
|
||||
char *textfont;
|
||||
int show_hidden_texts = tclgetboolvar("show_hidden_texts");
|
||||
|
||||
if(xctx->inst[n].ptr == -1) return;
|
||||
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
|
||||
|
|
@ -613,7 +614,7 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot,
|
|||
{
|
||||
text = (xctx->inst[n].ptr+ xctx->sym)->text[j];
|
||||
/* if(text.xscale*FONTWIDTH* xctx->mooz<1) continue; */
|
||||
if(text.flags & HIDE_TEXT) continue;
|
||||
if(!show_hidden_texts && (text.flags & HIDE_TEXT)) continue;
|
||||
if( hide && text.txt_ptr && strcmp(text.txt_ptr, "@symname") && strcmp(text.txt_ptr, "@name") ) continue;
|
||||
txtptr= translate(n, text.txt_ptr);
|
||||
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
|
||||
|
|
@ -694,7 +695,8 @@ void create_ps(char **psfile, int what)
|
|||
int c,i, textlayer;
|
||||
int old_grid;
|
||||
const char *textfont;
|
||||
|
||||
int show_hidden_texts = tclgetboolvar("show_hidden_texts");
|
||||
|
||||
if(what & 1) { /* prolog */
|
||||
numpages = 0;
|
||||
if(!(fd = open_tmpfile("psplot_", psfile)) ) {
|
||||
|
|
@ -819,7 +821,7 @@ void create_ps(char **psfile, int what)
|
|||
for(i=0;i<xctx->texts;i++)
|
||||
{
|
||||
textlayer = xctx->text[i].layer;
|
||||
if(xctx->text[i].flags & HIDE_TEXT) continue;
|
||||
if(!show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
|
||||
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
|
||||
|
||||
my_snprintf(ps_font_family, S(ps_font_name), "Helvetica");
|
||||
|
|
|
|||
|
|
@ -445,6 +445,7 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot,
|
|||
xPoly polygon;
|
||||
xSymbol *symptr;
|
||||
char *textfont;
|
||||
int show_hidden_texts = tclgetboolvar("show_hidden_texts");
|
||||
|
||||
if(xctx->inst[n].ptr == -1) return;
|
||||
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
|
||||
|
|
@ -536,7 +537,7 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot,
|
|||
for(j=0;j< symptr->texts;j++) {
|
||||
text = symptr->text[j];
|
||||
/* if(text.xscale*FONTWIDTH* xctx->mooz<1) continue; */
|
||||
if(symptr->text[j].flags & HIDE_TEXT) continue;
|
||||
if(!show_hidden_texts && (symptr->text[j].flags & HIDE_TEXT)) continue;
|
||||
if( hide && text.txt_ptr && strcmp(text.txt_ptr, "@symname") && strcmp(text.txt_ptr, "@name") ) continue;
|
||||
txtptr= translate(n, text.txt_ptr);
|
||||
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
|
||||
|
|
@ -619,7 +620,8 @@ void svg_draw(void)
|
|||
int *unused_layer;
|
||||
int color;
|
||||
Hilight_hashentry *entry;
|
||||
|
||||
int show_hidden_texts = tclgetboolvar("show_hidden_texts");
|
||||
|
||||
if(!lastdir[0]) my_strncpy(lastdir, pwd_dir, S(lastdir));
|
||||
if(has_x && !xctx->plotfile[0]) {
|
||||
tclvareval("tk_getSaveFile -title {Select destination file} -initialfile {",
|
||||
|
|
@ -739,7 +741,7 @@ void svg_draw(void)
|
|||
for(i=0;i<xctx->texts;i++)
|
||||
{
|
||||
textlayer = xctx->text[i].layer;
|
||||
if(xctx->text[i].flags & HIDE_TEXT) continue;
|
||||
if(!show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
|
||||
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
|
||||
my_snprintf(svg_font_family, S(svg_font_family), tclgetvar("svg_font_name"));
|
||||
my_snprintf(svg_font_style, S(svg_font_style), "normal");
|
||||
|
|
|
|||
|
|
@ -4513,7 +4513,7 @@ proc no_open_dialogs {} {
|
|||
## "viewdata_wcounter" should be kept unique as it is the number of open viewdatas
|
||||
## "measure_id" should be kept unique since we allow only one measure tooltip in graphs
|
||||
## "tabbed_interface"
|
||||
|
||||
## "case_insensitive" case insensitive symbol lookup (on case insensitive filesystems only!)
|
||||
|
||||
set tctx::global_list {
|
||||
auto_hilight autotrim_wires bespice_listen_port big_grid_points bus_replacement_char
|
||||
|
|
@ -4535,7 +4535,7 @@ set tctx::global_list {
|
|||
netlist_type no_change_attrs noprint_libs old_selected_tok
|
||||
only_probes path pathlist persistent_command preserve_unchanged_attrs prev_symbol ps_colors rainbow_colors
|
||||
rawfile_loaded rcode recentfile replace_key retval retval_orig rotated_text save_initialfile search_exact
|
||||
search_found search_select search_value selected_tok show_infowindow show_pin_net_names
|
||||
search_found search_select search_value selected_tok show_hidden_texts show_infowindow show_pin_net_names
|
||||
simconf_default_geometry simconf_vpos
|
||||
spiceprefix split_files svg_colors svg_font_name symbol symbol_width sym_txt tclcmd_txt tclstop
|
||||
text_line_default_geometry textwindow_fileid textwindow_filename textwindow_w tmp_bus_char
|
||||
|
|
@ -5026,6 +5026,7 @@ proc build_widgets { {topwin {} } } {
|
|||
select_layers
|
||||
xschem redraw
|
||||
}
|
||||
$topwin.menubar.view.menu add checkbutton -label "Show hidden texts" -variable show_hidden_texts -command {xschem redraw}
|
||||
$topwin.menubar.view.menu add command -label "Change current layer color" -accelerator {} -command {
|
||||
change_color
|
||||
}
|
||||
|
|
@ -5490,6 +5491,7 @@ set_ne unzoom_nodrift 0
|
|||
set_ne change_lw 1
|
||||
set_ne line_width 0
|
||||
set_ne draw_window 0
|
||||
set_ne show_hidden_texts 0
|
||||
set_ne incr_hilight 1
|
||||
set_ne enable_stretch 0
|
||||
set_ne constrained_move 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue