Comment 3 for bug 716384

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 716384] Re: size of qdiff windows invoked from qcommit (pending merge) is default

So, investigating this bug I found that:

in qbzr/lib/utils.py we have the following code in restoreSize:

         is_maximized = config.get_option(name + "_window_maximized")
         if is_maximized in ("True", "1"):
             self.setWindowState(QtCore.Qt.WindowMaximized)

Adding trace point after config.get_option I see the following:

first time for qdiff we read qdiff_window_maximized option as u'True'
(unicode string), but second time we read the same option from the same
process as bool True. Why? I don't understand.

So the if statement in the second line is False for the second case.

The simplest fix is to extend the if statement, the better fix is to
adopt get_user_options_as_bool from bzrlib.config.