Skip to main content
Topic: [Bug] 581 shows map editing tools when not in public player mode (Read 3117 times) previous topic - next topic

[Bug] 581 shows map editing tools when not in public player mode

In earlier versions of Pak128, the map editing tools icon was hidden when the player was not in public player mode; now, it is always visible, but is only usable in public player mode: in other modes, clicking on it produces no result. This is confusing for players, I think, because it is not immediately clear why clicking on a menu icon should have no effect.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: [Bug] 581 shows map editing tools when not in public player mode

Reply #1
It's a program bug, not pakset. There were no changes at all to menuconf.tab since late February. 102.0 loads my last working copy (593) without this button, program working copy (2521) with it.

Edit: moved.

Edit2: for the interested - it might be that current code skips the get_icon function in toolbar_t and instead uses the one defined in wkz_???. Not sure if it's true or why, yet.

Edit3: OK, got it. the virtual-ising stopped to work because const qualifier was added for get_icon in wkz_something (in his underground patch) and signature in toolbar_t didn't match anymore, so bye bye virtual. All the rest depended on getting empty icon from that function, so hiding it broke. Adding const to toolbar_t version of get_icon fixed this, but I have absolutely no clue why it should be there (or not), so... test :)

http://vs.simutrans.com/misc_files/edittools-2522.patch

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: [Bug] 581 shows map editing tools when not in public player mode

Reply #2
thank you. fixed in 2523. get_icon was declared const in werkzeug_t but not in toolbar_t, which means the toolbar_t geticon-routine was no inheritant (?) of the routine in werkzeug_t. :P
Parsley, sage, rosemary, and maggikraut.

Re: [Bug] 581 shows map editing tools when not in public player mode

Reply #3
Awwwww, I didn't refresh this page and had to find it myself ;D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: [Bug] 581 shows map editing tools when not in public player mode

Reply #4
The same here, refreshing to see your edit2 would have save me some minutes, too :)
Parsley, sage, rosemary, and maggikraut.

 

Re: [Bug] 581 shows map editing tools when not in public player mode

Reply #5
In my defense, first I had to read a book to understand the exact rules for virtual in C++ :)

Funny... in the past I was concerned that the only person hunting bugs will be prissi. Interesting how times change!

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!