diff --git a/src/blackgui/views/viewbase.h b/src/blackgui/views/viewbase.h index edb60e800..a440c8d62 100644 --- a/src/blackgui/views/viewbase.h +++ b/src/blackgui/views/viewbase.h @@ -557,7 +557,7 @@ namespace BlackGui int m_skipResizeThreshold = 40; //!< when to skip resize (rows count) int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time int m_loadIndicatorTimeoutMsDefault = 30 * 1000; //!< default time for timeout - bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again + bool m_forceStretchLastColumnWhenResized = true; //!< a small table might (few columns) fail stretching, force again bool m_showingLoadIndicator = false; //!< showing loading indicator bool m_enabledLoadIndicator = true; //!< loading indicator enabled/disabled bool m_acceptClickSelection = false; //!< clicked diff --git a/src/blackgui/views/viewbasenontemplate.cpp b/src/blackgui/views/viewbasenontemplate.cpp index 5f4c12185..17a383dbc 100644 --- a/src/blackgui/views/viewbasenontemplate.cpp +++ b/src/blackgui/views/viewbasenontemplate.cpp @@ -760,6 +760,10 @@ namespace BlackGui void CViewBaseNonTemplate::fullResizeToContents() { + //! \fixme 2019-04 Disabled the magic FOO trick for resizing + //! Not working anymore and NOT needed ??? anymore, seems like + + /** // resize to maximum magic trick from: // http://stackoverflow.com/q/3433664/356726 this->setVisible(false); @@ -773,6 +777,7 @@ namespace BlackGui vpNew.setWidth(screenGeometry.width()); this->viewport()->setGeometry(vpNew); } + **/ this->resizeColumnsToContents(); // columns @@ -784,12 +789,19 @@ namespace BlackGui m_resizeCount++; // re-stretch - if (m_forceStretchLastColumnWhenResized) { this->horizontalHeader()->setStretchLastSection(true); } - if (m_forceColumnsToMaxSize) { this->viewport()->setGeometry(vpOriginal); } + if (m_forceStretchLastColumnWhenResized) + { + // toggling forces the stretch, otherwise not working + this->horizontalHeader()->setStretchLastSection(false); + this->horizontalHeader()->setStretchLastSection(true); + } + /** Magic FOO + // if (m_forceColumnsToMaxSize) { this->viewport()->setGeometry(vpOriginal); } // if I store the original visibility and then // set it back here, the whole view disappears - this->setVisible(true); + // this->setVisible(true); + **/ } void CViewBaseNonTemplate::customMenuRequested(const QPoint &pos)