From 99b1474bdfe0e3fd9dfe7e802fd2473efd50b583 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 5 Aug 2019 09:09:25 -0300 Subject: [PATCH] Don't show tiles controls in color bar by default --- src/app/ui/color_bar.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/ui/color_bar.cpp b/src/app/ui/color_bar.cpp index 1acd03ce3..fe9f6ea2b 100644 --- a/src/app/ui/color_bar.cpp +++ b/src/app/ui/color_bar.cpp @@ -213,6 +213,15 @@ ColorBar::ColorBar(int align, TooltipManager* tooltipManager) m_tilesHBox.addChild(&m_tilesButton); m_tilesHBox.addChild(&m_tilesetModeButtons); + // Hide the tiles controls by default. Without this, when the first + // onActiveSiteChange() event is received, and the we ask for the + // m_tilesHBox visibility, it might say that it's hidden because the + // color bar is hidden (because it's not yet in the screen, it's the + // first time it will be displayed). So we have to add this to make + // the tiles controls invisible in the first appearance of the color + // bar. + m_tilesHBox.setVisible(false); + addChild(&m_buttons); addChild(&m_tilesHBox); addChild(&m_splitter);