Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. diff --git a/ui/formwidgets.cpp b/ui/formwidgets.cpp
  2. index 290bb5658..8e1569adc 100644
  3. --- a/ui/formwidgets.cpp
  4. +++ b/ui/formwidgets.cpp
  5. @@ -328,7 +328,11 @@ void FormWidgetIface::moveTo( int x, int y )
  6.  
  7. bool FormWidgetIface::setVisibility( bool visible )
  8. {
  9. - bool hadfocus = m_widget->hasFocus();
  10. + const bool hadfocus = m_widget->hasFocus();
  11. +
  12. + if ( visible == m_widget->isVisible() )
  13. + return hadfocus;
  14. +
  15. if ( hadfocus )
  16. m_widget->clearFocus();
  17. m_widget->setVisible( visible );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement