Skip to content

Commit a0aa7de

Browse files
committed
dgui: fix critical regression introduced by 43a5719
1 parent 818ed57 commit a0aa7de

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

direct/src/gui/DirectGuiBase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181

8282
from panda3d.core import *
8383
from direct.showbase import ShowBaseGlobal
84+
from direct.showbase import ShowBase
8485
from . import DirectGuiGlobals as DGG
8586
from .OnscreenText import *
8687
from .OnscreenGeom import *

tests/gui/test_DirectButton.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from direct.gui.DirectButton import DirectButton
2+
3+
4+
def test_button_destroy():
5+
btn = DirectButton(text="Test")
6+
btn.destroy()

tests/gui/test_DirectEntry.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
import sys
44

55

6+
def test_entry_destroy():
7+
entry = DirectEntry()
8+
entry.destroy()
9+
10+
611
def test_entry_get():
712
entry = DirectEntry()
813
assert isinstance(entry.get(), str)

0 commit comments

Comments
 (0)