@@ -466,17 +466,21 @@ namespace tcgfx {
466466 forceDrawWidgets = true ;
467467 }
468468 if (titleNeeded && (locRedrawMode == MENUDRAW_COMPLETE_REDRAW || titleEntry->getMenuItem ()->isChanged (displayNumber))) {
469- drawMenuItem (titleEntry, Coord (0 , 0 ), cardLayoutPane->getTitleSize (), DrawingFlags (true , activeItem == titleEntry->getMenuItem (), menuMgr.getCurrentEditor () == titleEntry->getMenuItem ()));
469+ bool active = titleNeeded && activeItem == titleEntry->getMenuItem ();
470+ drawMenuItem (titleEntry, Coord (0 , 0 ), cardLayoutPane->getTitleSize (), DrawingFlags (true , active, menuMgr.getCurrentEditor () == titleEntry->getMenuItem ()));
471+ forceDrawWidgets = true ;
470472 }
471473 if (entry->getMenuItem ()->isChanged (displayNumber) || locRedrawMode == MENUDRAW_COMPLETE_REDRAW) {
472474 getDeviceDrawable ()->setDrawColor (entry->getDisplayProperties ()->getColor (ItemDisplayProperties::BACKGROUND));
473475 getDeviceDrawable ()->drawBox (cardLayoutPane->getMenuLocation (), cardLayoutPane->getMenuSize (), true );
474476 int offsetY = (cardLayoutPane->getMenuSize ().y - int (entry->getHeight ())) / 2 ;
475477 Coord menuStart (cardLayoutPane->getMenuLocation ().x , cardLayoutPane->getMenuLocation ().y + offsetY);
476478 Coord menuSize (cardLayoutPane->getMenuSize ().x , int (entry->getHeight ()));
477- drawMenuItem (entry, menuStart, menuSize, DrawingFlags (false , activeItem == titleEntry->getMenuItem (), menuMgr.getCurrentEditor () == titleEntry->getMenuItem ()));
479+ bool active = titleNeeded && activeItem == entry->getMenuItem ();
480+ drawMenuItem (entry, menuStart, menuSize, DrawingFlags (false , active, menuMgr.getCurrentEditor () == entry->getMenuItem ()));
478481 }
479482 cardLayoutPane->prepareAndPaintButtons (this , activeIndex, itemOrderByRow.count (), titleMode != NO_TITLE);
483+ setTitleOnDisplay (true );
480484 } else {
481485 if (locRedrawMode == MENUDRAW_COMPLETE_REDRAW && cardLayoutPane != nullptr ) {
482486 cardLayoutPane->notInUse ();
0 commit comments