@@ -112,8 +112,8 @@ MainWindow::MainWindow(SplashDialog *splash) : FramelessMainWindow() {
112112 auto font = _editArea->font ();
113113 auto fm = QFontMetrics (font);
114114 _editArea->setAlignment (Qt::AlignCenter);
115- _editArea-> setFixedWidth (fm. horizontalAdvance ( ' A ' ) * 5 ); // ASCII or HEX
116- _editArea->setEnabled ( false );
115+ // ASCII or HEX or NONE
116+ _editArea->setFixedWidth (fm. horizontalAdvance ( ' A ' ) * 5 );
117117 m_status->addWidget (_editArea);
118118
119119 auto separator = new QFrame (m_status);
@@ -768,7 +768,6 @@ MainWindow::buildUpFindResultDock(ads::CDockManager *dock,
768768 });
769769
770770 auto header = m_findresult->horizontalHeader ();
771- header->setSectionResizeMode (QHeaderView::Interactive);
772771 header->setSectionResizeMode (3 , QHeaderView::Stretch);
773772 header->setSectionResizeMode (4 , QHeaderView::Stretch);
774773 auto dw = buildDockWidget (dock, QStringLiteral (" FindResult" ),
@@ -2928,7 +2927,6 @@ void MainWindow::on_editableAreaClicked(int area) {
29282927 } else {
29292928 _editArea->setText (QStringLiteral (" HEX" ));
29302929 }
2931- _editArea->setEnabled (currentEditor () != nullptr );
29322930}
29332931
29342932void MainWindow::on_viewtxt () {
@@ -4417,11 +4415,27 @@ void MainWindow::closeEvent(QCloseEvent *event) {
44174415
44184416void MainWindow::showEvent (QShowEvent *event) {
44194417 FramelessMainWindow::showEvent (event);
4420- if (_showEvents) {
4421- _showEvents ();
4418+ static bool firstInit = true ;
4419+ if (firstInit) {
4420+ if (_showEvents) {
4421+ _showEvents ();
4422+ _showEvents = {};
4423+ }
4424+
4425+ connect (
4426+ m_findresult->horizontalHeader (), &QHeaderView::sectionResized,
4427+ this ,
4428+ [this ]() {
4429+ QTimer::singleShot (0 , [this ]() {
4430+ auto header = m_findresult->horizontalHeader ();
4431+ header->setSectionResizeMode (QHeaderView::Interactive);
4432+ });
4433+ },
4434+ Qt::SingleShotConnection);
4435+
44224436 PluginSystem::instance ().dispatchEvent (
44234437 IWingPlugin::RegisteredEvent::AppReady, {});
4424- _showEvents = {} ;
4438+ firstInit = false ;
44254439 }
44264440}
44274441
0 commit comments