Skip to content
  • Christian Ehrlicher's avatar
    Properly show/hide preview dialog · 851870fb
    Christian Ehrlicher authored
    Summary:
    The visiblity of the preview dialog was not synced with the preview action
    in the main window. Also the preview image was not created when then same
    puzzle was opened after going back to the overview.
    Some c++11 changed (using nullptr instead 0)
    Don't leak PuzzleComponent in GamePlay::loadPreview()
    
    Test Plan:
    - make sure to have a clean environment (e.g. no saved puzzles)
               - open a puzzle, activate preview
               - go back to overview
               - open another puzzle -> no preview and button state is unchecked
               - go back to overview
               - open first puzzle -> preview is open and button state is checked
               - go back to overview
               - open puzzle again -> preview does show something (instead 'Image is not available')
    
    Reviewers: #kde_games, ltoscano
    
    Reviewed By: ltoscano
    
    Subscribers: ltoscano, #kde_games
    
    Differential Revision: https://phabricator.kde.org/D7560
    851870fb