diff --git a/src/ftogglebutton.cpp b/src/ftogglebutton.cpp index b75b7108..0b5ab6bf 100644 --- a/src/ftogglebutton.cpp +++ b/src/ftogglebutton.cpp @@ -64,7 +64,8 @@ FToggleButton::FToggleButton (const FString& txt, FWidget* parent) , focus_inside_group(true) , text() { - init(txt); + FToggleButton::setText(txt); // call own method + init(); if ( parent && parent->isInstanceOf("FButtonGroup") ) { @@ -611,13 +612,6 @@ void FToggleButton::setGroup (FButtonGroup* btngroup) button_group = btngroup; } -//---------------------------------------------------------------------- -void FToggleButton::init (const FString& txt) -{ - setText(txt); - init(); -} - //---------------------------------------------------------------------- void FToggleButton::init() { diff --git a/src/include/final/ftogglebutton.h b/src/include/final/ftogglebutton.h index 223a6d1b..0beceeb5 100644 --- a/src/include/final/ftogglebutton.h +++ b/src/include/final/ftogglebutton.h @@ -153,7 +153,6 @@ class FToggleButton : public FWidget void setGroup (FButtonGroup*); // Methods - void init (const FString&); void init(); int getHotkeyPos (wchar_t[], wchar_t[], uInt); void drawText (wchar_t[], int, uInt);