Commit 8d88ffcd authored by Matt Edman's avatar Matt Edman
Browse files

There's no need to force the main menu back up to the menubar since this

dialog doesn't have a menu anyway.


svn:r445
parent 69e4f845
Loading
Loading
Loading
Loading
+0 −24
Changes for src/gui/help/browser/helpbrowser.cpp: 0 added lines, 24 removed lines.
Original line number Diff line number Diff line
@@ -195,27 +195,3 @@ HelpBrowser::currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *prev)
  ui.txtTopic->setSource(QUrl(current->data(0, ROLE_TOPIC_QRC_PATH).toString()));
}
/** Overloads the default close() slot, so we can force the parent to become
 * visible. This only matters on Mac, so we can ensure the correct menubar is
 * displayed. */
void
HelpBrowser::close()
{
  MainWindow *p = (MainWindow *)parent();
  if (p) {
    p->show();
  }
  QMainWindow::close();
}

/** Responds to when the user closes the form via the 'X' */
void
HelpBrowser::closeEvent(QCloseEvent *e)
{
  MainWindow *p = (MainWindow *)parent();
  if (p) {
    p->show();
  }
  e->accept();
}
+0 −9
Changes for src/gui/help/browser/helpbrowser.h: 0 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -45,14 +45,6 @@ public:
  /** Default destructor **/
  ~HelpBrowser();

public:
  /** Called when the user triggers the close action */
  void close();

protected:
  /** Catches the close event when the user clicks on the X in the titlebar */
  void closeEvent(QCloseEvent *event);

private slots:
  /** Called when the user selects a different item in the topic tree. */
  void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *prev);
@@ -72,7 +64,6 @@ private:
  QTreeWidgetItem* createTopicTreeItem(const QDomElement &topicElement,
                                       QTreeWidgetItem *parent);

  
  /** Qt Designer generated QObject */
  Ui::HelpBrowser ui;
};