¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Bug. Window width pixels


 
Edited



If you switch from -1 to any value (or from value to -1), then it's fine. But if you switch between different values, then there is a problem. For example, between 1366 and 1920 (forward and backward). The previous value is applied. If the operation is repeated, the new value is applied. You have to apply it twice (button "On").


 

This is..


 

?I think that here

? if conf.window_width > 0:
? ? ? wFrame, h = frame.GetClientSize().Get() # client window width
? ? ? graph = GraphScreen(frame, self.width//2, self.width//2, None) # make a GraphScreen to calculate borders
? ? ? self.graph_width = wFrame - (graph.width - graph.graph_width) # less graph borders equals actual graph_width
? ? ? graph.Destroy()
? ? ? del graph
? ? ? if self.graph_width % 2 == 1: # Both data_width and graph_width are even numbers
? ? ? ? self.graph_width -= 1
? ? ? width = int(self.graph_width / conf.display_fraction) # estimated data width
? ? ? for x in fftPreferedSizes:
? ? ? ? if x >= width:
? ? ? ? ? self.data_width = x
? ? ? ? ? break
? ? ? else:
? ? ? ? self.data_width = fftPreferedSizes[-1]


 

The value of?wFrame in the second line is incorrect at first, and after the second reboot it becomes correct.


 

The problem was solved as follows.
#wFrame, h = frame.GetClientSize().Get()?# client window width
wFrame = conf.window_width - 15


 

Thanks so much. You reported the problem, solved it and provided a fix. Nice work!

Jim
N2ADR