Author Topic: Image field in wxImagePanel wxSmith tools  (Read 742 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5109
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Image field in wxImagePanel wxSmith tools
« Reply #15 on: November 04, 2018, 03:44:35 am »
I'm not following the topic, but please check that old wxs files still work and produce correct code!
OK, I will check it.
In-fact, my patch does not change the way the old wxs does, because the old way of wxImagePanel use an Image ID of the wxImageTool. My patch just add another option when the old way failed, which means there is no such Image ID found in the wxImageTool.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5109
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Image field in wxImagePanel wxSmith tools
« Reply #16 on: November 16, 2018, 03:58:29 pm »
I have confirmed that using the old way(first add a wxImage tool control, then add a wxImagePanel with the var name of the wxImage) and the new way(with my patch) generate the identical source code.

So, the patch is in trunk now.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.