开云体育

How is the default layer assigned to resource folder icons used with the panel editors? #controlpaneleditor #paneleditor


 

Normally GIF objects I create and add using CPE are higher than 1.? I recently created a large transparent GIF to cover a panel, and which I wanted to set to a level # above background objects and lamps I don't want to change with mouse-clicks, and below controls I do want to operate.? However, when I added the icon I couldn't manipulate it with CPE.? It dragged over but then disappeared.? By jumping to PE I could see it was set to layer 1 like CTC plates, and where I could set it higher than 1 so I can manipulate it with CPE which I normally use.
?
Which raises the question... how is the layer number assigned to icons placed in resource icon folders?? Why was this GIF set at 1 while the others are not?? Is this something I can change when creating GIF or after loaded in folder?
?
--
Jim Moomaw
Portland, OR
- Willamette Model Railroad Club (WMRC)
- NMRA, Pacific NW


 

Jim,

I suspect this answers the question.

??????????????? if (icon.getIconHeight() > 500 || icon.getIconWidth() > 600) {
??????????????????? ni.setDisplayLevel(BKG);

BKG is defined as level 1.


Dave Sand


----- Original message -----
From: "Jim Moomaw - PDX via groups.io" <JMOOMAW_COM=[email protected]>
Subject: [jmriusers] How is the default layer assigned to resource folder icons used with the PanelPro panel editors?
Date: Saturday, March 22, 2025 6:47 AM

Normally GIF objects I create and add using CPE are higher than 1.? I recently created a large transparent GIF to cover a panel, and which I wanted to set to a level # above background objects and lamps I don't want to change with mouse-clicks, and below controls I do want to operate.? However, when I added the icon I couldn't manipulate it with CPE.? It dragged over but then disappeared.? By jumping to PE I could see it was set to layer 1 like CTC plates, and where I could set it higher than 1 so I can manipulate it with CPE which I normally use.
?
Which raises the question... how is the layer number assigned to icons placed in resource icon folders?? Why was this GIF set at 1 while the others are not?? Is this something I can change when creating GIF or after loaded in folder?
?
--
Jim Moomaw
Portland, OR
- Willamette Model Railroad Club (WMRC)
- NMRA, Pacific NW


 

I think that code dates back to when there wasn’t a way to change the level of something on a panel. It was probably meant to make sure that large, background images _stayed_ in the background.

Maybe that’s no longer important?

Bob

On Mar 22, 2025, at 10:33?AM, Dave Sand via groups.io <ds@...> wrote:

Jim,

I suspect this answers the question.

if (icon.getIconHeight() > 500 || icon.getIconWidth() > 600) {
ni.setDisplayLevel(BKG);
BKG is defined as level 1.


Bob Jacobsen
rgj1927@...


 

Bob,

There is a comment that I did not copy:

// infer a background icon from its size

This occurs when "dropping" an icon on the CPE panel.


Dave Sand

----- Original message -----
From: "Bob Jacobsen via groups.io" <rgj1927@...>
To: [email protected]
Subject: Re: [jmriusers] How is the default layer assigned to resource folder icons used with the panel editors?
Date: Saturday, March 22, 2025 9:38 AM

I think that code dates back to when there wasn’t a way to change the level of something on a panel. It was probably meant to make sure that large, background images _stayed_ in the background.

Maybe that’s no longer important?

Bob

On Mar 22, 2025, at 10:33?AM, Dave Sand via groups.io <ds@...> wrote:

Jim,

I suspect this answers the question.

if (icon.getIconHeight() > 500 || icon.getIconWidth() > 600) {
ni.setDisplayLevel(BKG);
BKG is defined as level 1.


Bob Jacobsen
rgj1927@...


 

" ? // infer a background icon from its size "
?
Yeah, that makes perfect sense based on observation.?? It's the 'not expecting that to happen' thing that caught me out.?

?
"importance of background images staying in place..."
?
I'd say that's still important.? The "danger" of grabbing and moving those Lvl1 objects in PE is a downside of that editor (esp with no Ctrl-Z rescue);? that's not an issue for CPE, but also means CPE is useless for Lvl1 stuff.? An OK tradeoff in my eyes.? CPE works fine for most tasks, but then I forget about needing that "special" Lvl1 PE tool since I don't use it much.
?
--
Jim Moomaw
Portland, OR
- Willamette Model Railroad Club (WMRC)
- NMRA, Pacific NW