Skip to content

Commit 6589510

Browse files
committed
qtplasmac: fix double "qtvcp" ghost windows on repeated switches to the conversational tab
conv_clear_widgets() calls setParent(None) on all widgets when leaving the conversational tab. On the next entry, conv_setup() calls conv_new_pressed(None) which calls the set_line_...() functions that call .show() on now un-parented widgets. This results in two brief top level windows titled "qtvcp" flashing on screen. This was only triggered on subsequent conversational tab visits, not the first, since the widgets are only unparented after first the conv_clear_widgets() call. It also did't affect the NEW button since the widgets are still parented. It's unclear why this behavior was not noticed earlier. Probably a change in Qt or window manager behavior made the unparented widget .show() calls visible. I figured this level of digging was deep enough. Fixed by adding the "and button" guard to skip the set_line_...() calls in conv_new_pressed() when called with button=None from conv_setup(), as conv_shape_request() immediately rebuilds the layout correctly anyways.
1 parent ef9e17e commit 6589510

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

lib/python/qtvcp/lib/qtplasmac/conversational.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def conv_new_pressed(P, W, button):
207207
msg1 = _translate('HandlerClass', 'If you continue it will be deleted')
208208
if not P.dialog_show_yesno(QMessageBox.Warning, f'{head}', f'{msg0}\n\n{msg1}\n', f'{btn1}', f'{btn2}'):
209209
return
210-
if P.oldConvButton == 'conv_line':
210+
if P.oldConvButton == 'conv_line' and button:
211211
if W.lType.currentText() == _translate('Conversational', 'LINE POINT ~ POINT'):
212212
CONVLINE.set_line_point_to_point(P, W)
213213
elif W.lType.currentText() == _translate('Conversational', 'LINE BY ANGLE'):

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '016.085'
1+
VERSION = '016.086'
22
LCNCVER = '2.10'
33

44
'''

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.10</h2>
2626
</table>
2727
<br>
2828
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
29+
<br><b><u>016.086 2026 Jun 07</u></b>
30+
<ul style="margin:0;">
31+
<li>fix double "qtvcp" ghost windows on repeated switches to the conversational tab</li>
32+
</ul>
33+
2934
<br><b><u>016.085 2026 Jun 06</u></b>
3035
<ul style="margin:0;">
3136
<li>fix runaway jog when switching tabs while a jog key is held</li>

0 commit comments

Comments
 (0)