Skip to content
  • Igor Kushnir's avatar
    Don't call ConfigDialog::applyChanges() if nothing has changed · c441909c
    Igor Kushnir authored
    The OK button is always enabled, so it can be clicked when nothing is
    modified on the current page. Calling page->apply() and emitting
    configSaved() is useless and wasteful in this case.
    
    One downside of this optimization is that if a change of some widget on
    some ConfigPage is not connected to that page's changed() signal,
    clicking OK button no longer saves that setting, unless another
    "connected" widget on that page is also changed and the Apply button is
    enabled. However such missing connection is problematic in other ways:
    the Apply button does not become enabled; switching to a different
    ConfigPage silently discards a lone "unconnected" change. Therefore such
    a bug can be fixed properly only by adding the missing connection.
    c441909c