Author Topic: wxSmith - allow editing min/max size, when a resource is loaded from XRC file  (Read 4823 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
The topic says.
The current version of wxSmith, does not support editing the min/max size of a text control, when the resource is loaded from XRC file.
Code
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsbaseproperties.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsbaseproperties.cpp (revision 7595)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsbaseproperties.cpp (working copy)
@@ -55,8 +55,8 @@
     if ( Flags & flFont                             ) WXS_FONT_P         (wxsBaseProperties,m_Font,           _("Font"),                                                                          _T("font"),                        Priority2);
     if ( Flags & flToolTip                          ) WXS_STRING_P       (wxsBaseProperties,m_ToolTip,        _("Tooltip"),                                                                       _T("tooltip"),       _T(""),false, Priority2);
     if ( Flags & flHelpText                         ) WXS_STRING_P       (wxsBaseProperties,m_HelpText,       _("Help text"),                                                                     _T("help"),          _T(""),false, Priority2);
-    if ( Flags & flMinMaxSize && Source             ) WXS_SIZE_P         (wxsBaseProperties,m_MinSize,        _("Default Min size"),_("Min Width"),_("Min Height"),_("Min size in dialog units"), _T("minsize"),                     Priority2);
-    if ( Flags & flMinMaxSize && Source             ) WXS_SIZE_P         (wxsBaseProperties,m_MaxSize,        _("Default Max size"),_("Max Width"),_("Max Height"),_("Max size in dialog units"), _T("maxsize"),                     Priority2);
+    if ( Flags & flMinMaxSize                       ) WXS_SIZE_P         (wxsBaseProperties,m_MinSize,        _("Default Min size"),_("Min Width"),_("Min Height"),_("Min size in dialog units"), _T("minsize"),                     Priority2);
+    if ( Flags & flMinMaxSize                       ) WXS_SIZE_P         (wxsBaseProperties,m_MaxSize,        _("Default Max size"),_("Max Width"),_("Max Height"),_("Max size in dialog units"), _T("maxsize"),                     Priority2);
     if ( Flags & flExtraCode  && Source             ) WXS_STRING_P       (wxsBaseProperties,m_ExtraCode,      _("Extra code"),                                                                    _T("extra_code"),    _T(""),false, Priority2);
     if (                         PSFilter           ) WXS_BOOL_P         (wxsBaseProperties,m_ParentFromArg,  _("Use parent from argument"),                                                      _T("parent_arg"),    true,         Priority2);
     if ( Flags & flId         && PSFilter           ) WXS_BOOL_P         (wxsBaseProperties,m_IdFromArg,      _("Use ID from argument"),                                                          _T("id_arg"),        true,         Priority2);

This is a patch that fixes the problem.
Can you review it and tell me if something is wrong with it?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]